Skip to content

Commit

Permalink
#500 init(Grail4.0.12 upgrade)
Browse files Browse the repository at this point in the history
  • Loading branch information
qifeng-bai committed Sep 12, 2021
1 parent d3816f8 commit e9089cf
Show file tree
Hide file tree
Showing 17 changed files with 192 additions and 503 deletions.
1 change: 0 additions & 1 deletion .gitattribute

This file was deleted.

19 changes: 11 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
out
target/*
.idea/*
*.iml
wrapper/*
.slcache/*
build/*
.gradle/*
Thumbs.db
.DS_Store
.gradle
build/
out/
.idea
*.iml
*.ipr
*.iws
.project
.settings
.classpath
69 changes: 0 additions & 69 deletions .travis/trigger-travis.sh

This file was deleted.

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,6 @@ Use these as reference:
* https://github.com/AtlasOfLivingAustralia/ala-hub/blob/77ad912b6007afb21e5ee9d46cd068ba2040eb9f/grails-app/assets/stylesheets/alaBs.css#L11
* https://github.com/AtlasOfLivingAustralia/ala-hub/blob/c6c999d7e87de985bfc65e1fe6fe5cd13396212f/grails-app/assets/javascripts/alaBs.js#L11

## Grails 4

Starting with version 3.4.0, biocache-hubs has been migrated to run on Grails 4
168 changes: 107 additions & 61 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,69 +1,93 @@
buildscript {
repositories {
mavenLocal()
maven { url "https://nexus.ala.org.au/content/groups/public/" }
maven { url "https://repo.grails.org/grails/core" }
maven { url "https://nexus.ala.org.au/content/groups/public/" }
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsVersion"
classpath "com.bertramlabs.plugins:asset-pipeline-gradle:2.14.2"
//classpath "org.grails.plugins:hibernate5:7.0.5"
classpath "gradle.plugin.com.github.erdi.webdriver-binaries:webdriver-binaries-gradle-plugin:2.0"
classpath "com.bertramlabs.plugins:asset-pipeline-gradle:3.2.4"
}
}

version "3.0.6-SNAPSHOT"
version "3.4.0-SNAPSHOT"
group "au.org.ala.plugins.grails"

apply plugin:"eclipse"
apply plugin:"idea"
apply plugin:"org.grails.grails-plugin"
apply plugin:"org.grails.grails-plugin-publish"
apply plugin:"org.grails.grails-web"
apply plugin:"com.github.erdi.webdriver-binaries"
apply plugin:"com.bertramlabs.asset-pipeline"
apply plugin:"org.grails.grails-gsp"
apply plugin:"asset-pipeline"
apply plugin:"maven-publish"

sourceCompatibility = 1.8
targetCompatibility = 1.8

repositories {
mavenLocal()
maven { url "https://nexus.ala.org.au/content/groups/public/" }
maven { url "https://nexus.ala.org.au/content/groups/public/" }
maven { url "https://repo.grails.org/grails/core" }
}

configurations.all {
resolutionStrategy.cacheChangingModulesFor 1, 'minutes'
configurations {
developmentOnly
runtimeClasspath {
extendsFrom developmentOnly
}
}

// Inplace plugin config

// Set to true it needed only for development
boolean inplace = false
// Inplace plugins ala-charts-plugin and images-client-plugin are defined in ala-hub configuration

dependencies {
def noCache = {
exclude group: 'org.grails.plugins', module: 'cache'
exclude group: 'org.ehcache', module: 'ehcache'
}

developmentOnly("org.springframework.boot:spring-boot-devtools")
compile "org.springframework.boot:spring-boot-starter-logging"
compile "org.springframework.boot:spring-boot-autoconfigure"
compile "org.grails:grails-core"
compile "org.springframework.boot:spring-boot-starter-actuator"
compile "org.springframework.boot:spring-boot-starter-tomcat"
compile "org.grails:grails-dependencies"
compile "org.grails:grails-web-boot"
compile "org.grails:grails-logging"
compile "org.grails:grails-plugin-rest"
compile "org.grails:grails-plugin-databinding"
compile "org.grails:grails-plugin-i18n"
compile "org.grails:grails-plugin-services"
compile "org.grails:grails-plugin-url-mappings"
compile "org.grails:grails-plugin-interceptors"
compile "org.grails.plugins:cache"
compile "org.grails.plugins:async"
compile "org.grails.plugins:scaffolding"
compile "org.grails.plugins:events"
compile "org.grails.plugins:hibernate5"
compile "org.hibernate:hibernate-core:5.4.18.Final"
compile "org.grails.plugins:gsp"
compileOnly "io.micronaut:micronaut-inject-groovy"
console "org.grails:grails-console"
profile "org.grails.profiles:web-plugin"
provided "org.grails:grails-plugin-services"
provided "org.grails:grails-plugin-domain-class"
runtime "com.bertramlabs.plugins:asset-pipeline-grails:2.14.2"
testCompile "org.grails:grails-plugin-testing"
profile "org.grails.profiles:web"
runtime "org.glassfish.web:el-impl:2.1.2-b03"
runtime "com.h2database:h2"
runtime "org.apache.tomcat:tomcat-jdbc"
runtime "javax.xml.bind:jaxb-api:2.3.1"
runtime "com.bertramlabs.plugins:asset-pipeline-grails:3.2.4"
testCompile "io.micronaut:micronaut-inject-groovy"
testCompile "org.grails:grails-gorm-testing-support"
testCompile "org.mockito:mockito-core"
testCompile "org.grails:grails-web-testing-support"
testCompile "org.grails.plugins:geb"
testRuntime "org.seleniumhq.selenium:selenium-htmlunit-driver:2.47.1"
testRuntime "net.sourceforge.htmlunit:htmlunit:2.18"
testCompile "org.seleniumhq.selenium:selenium-remote-driver:3.14.0"
testCompile "org.seleniumhq.selenium:selenium-api:3.14.0"
testCompile "org.seleniumhq.selenium:selenium-support:3.14.0"
testRuntime "org.seleniumhq.selenium:selenium-chrome-driver:3.14.0"
testRuntime "org.seleniumhq.selenium:selenium-firefox-driver:3.14.0"

testImplementation group: 'org.spockframework', name: 'spock-spring', version: '1.3-groovy-2.5'
implementation group: 'org.ehcache', name: 'ehcache', version: '3.1.0'
testImplementation group: 'xml-apis', name: 'xml-apis', version: '1.4.01'
//compile 'org.grails:grails-validation:3.1.14'

// testCompile "org.grails:grails-test-mixins:3.3.0"

def noCache = {
exclude group: 'org.grails.plugins', module: 'cache'
exclude group: 'org.ehcache', module: 'ehcache'
}

//jars
compile "org.apache.httpcomponents:httpclient:4.5.6"
Expand All @@ -81,46 +105,49 @@ dependencies {
//plugins
//compile 'org.grails.plugins:cache-ehcache:3.0.0.M1'
compile 'org.grails.plugins:http-builder-helper:1.0.2.ALA'
compile "org.grails.plugins:ala-admin-plugin:2.2", noCache
compile "org.grails.plugins:ala-auth:3.2.3", noCache

if(!inplace) {
compile "au.org.ala.plugins.grails:images-client-plugin:1.2", noCache
compile "au.org.ala.plugins.grails:ala-charts-plugin:2.0.1", noCache
}
compile "org.grails.plugins:ala-admin-plugin:2.2"
compile "org.grails.plugins:ala-auth:3.2.3"
compile "au.org.ala.plugins.grails:images-client-plugin:1.4-SNAPSHOT"
compile "au.org.ala.plugins.grails:ala-charts-plugin:2.2"

compile "au.org.ala:userdetails-service-client:1.5.0"
compile 'commons-fileupload:commons-fileupload:1.4'
}

bootRun {
jvmArgs('-Dspring.output.ansi.enabled=always')
addResources = true
ignoreExitValue true
jvmArgs(
'-Dspring.output.ansi.enabled=always',
'-noverify',
'-XX:TieredStopAtLevel=1',
'-Xmx1024m')
sourceResources sourceSets.main
String springProfilesActive = 'spring.profiles.active'
systemProperty springProfilesActive, System.getProperty(springProfilesActive)
}
// enable if you wish to package this plugin as a standalone application
bootRepackage.enabled = false
grailsPublish {
// TODO: Provide values here
// user = 'user'
// key = 'key'

githubSlug = 'AtlasOfLivingAustralia/biocache-hubs'
websiteUrl = 'https://github.com/AtlasOfLivingAustralia/biocache-hubs'
license {
name = 'MPL-1.1'

tasks.withType(GroovyCompile) {
configure(groovyOptions) {
forkOptions.jvmArgs = ['-Xmx1024m']
}
issueTrackerUrl = 'https://github.com/AtlasOfLivingAustralia/biocache-hubs/issues'
vcsUrl = 'https://github.com/AtlasOfLivingAustralia/biocache-hubs'
title = "Biocache Hubs Plugin"
desc = '''\
A Grails plugin to provide the core functionality for searching and displaying biodiversity data from
biocache web services. Data access is via JSON REST web services
from the ALA biocache-service app (no local DB is required for this app).
'''
developers = [:]
}

webdriverBinaries {
chromedriver '2.45.0'
geckodriver '0.24.0'
}

tasks.withType(Test) {
systemProperty "geb.env", System.getProperty('geb.env')
systemProperty "geb.build.reportsDir", reporting.file("geb/integrationTest")
systemProperty "webdriver.chrome.driver", System.getProperty('webdriver.chrome.driver')
systemProperty "webdriver.gecko.driver", System.getProperty('webdriver.gecko.driver')
}


assets {
packagePlugin = true
minifyJs = true
minifyCss = true
}

publishing {
Expand All @@ -134,4 +161,23 @@ publishing {
}
}
}

publications {
mavenJar(org.gradle.api.publish.maven.MavenPublication) {
pom.withXml {
def pomNode = asNode()
pomNode.dependencyManagement.replaceNode {}

// simply remove dependencies without a version
// version-less dependencies are handled with dependencyManagement
// see https://github.com/spring-gradle-plugins/dependency-management-plugin/issues/8 for more complete solutions
pomNode.dependencies.dependency.findAll {
it.version.text().isEmpty()
}.each {
it.replaceNode {}
}
}
from components.java
}
}
}
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Mon May 18 05:26:56 AEST 2020
grailsVersion=3.2.11
grailsWrapperVersion=1.0.0
gormVersion=6.1.12.RELEASE
gradleWrapperVersion=3.4.1
grailsVersion=4.0.12
gorm.version=7.0.8.RELEASE
org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.jvmargs=-Dfile.encoding=UTF-8 -Xmx1024M
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Thu Aug 31 10:01:36 AEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\:https://services.gradle.org/distributions/gradle-5.6.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\:https://services.gradle.org/distributions/gradle-3.4.1-all.zip
Loading

0 comments on commit e9089cf

Please sign in to comment.