diff --git a/.travis.yml b/.travis.yml index dca36ed..9b3ace0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,13 @@ branches: - dev - feature/grails5 - feature/plugin-upgrade + - feature/grails6-upgrade + +before_install: + - sudo mkdir -p /data/dashboard + - sudo chmod o+xw /data + - sudo chmod o+xw /data/dashboard + before_cache: - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock - rm -fr $HOME/.gradle/caches/*/plugin-resolution/ @@ -18,8 +25,14 @@ cache: - $HOME/.gradle/caches/ - $HOME/.gradle/wrapper/ +install: + - 'travis_wait 30 ./gradlew clean' + - './gradlew assemble' + after_success: - '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && travis_retry ./gradlew publish' + + env: global: - JAVA_TOOL_OPTIONS=-Dhttps.protocols=TLSv1.2 diff --git a/build.gradle b/build.gradle index 1e9f91b..ccf2c3e 100644 --- a/build.gradle +++ b/build.gradle @@ -1,35 +1,21 @@ buildscript { - repositories { - mavenLocal() - maven { url "https://nexus.ala.org.au/content/groups/public/" } - maven { url "https://repo.grails.org/grails/core" } - } - dependencies { - classpath "org.grails:grails-gradle-plugin:$grailsVersion" - classpath "gradle.plugin.com.github.erdi.webdriver-binaries:webdriver-binaries-gradle-plugin:$webdriverBinariesVersion" - classpath "com.bertramlabs.plugins:asset-pipeline-gradle:3.4.6" - classpath 'org.grails.plugins:quartz:2.0.13' - } + version "2.6-SNAPSHOT" + group "au.org.ala" + description "Dashboard application" } plugins { + id "groovy" + id "org.grails.grails-web" + id "org.grails.grails-gsp" + id "application" + id "war" + id "maven-publish" + id "com.bertramlabs.asset-pipeline" id "com.gorylenko.gradle-git-properties" version "2.4.1" } -version "2.5.1" -group "au.org.ala" -description "Dashboard application" - -apply plugin:"eclipse" -apply plugin:"idea" -apply plugin:"war" -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:"maven-publish" - publishing { repositories { maven { @@ -50,12 +36,17 @@ publishing { bootWar { launchScript() + dependsOn(compileGroovyPages) +} + +war { + dependsOn(compileGroovyPages) } repositories { mavenLocal() maven { url "https://nexus.ala.org.au/content/groups/public/" } - maven { url "https://repo.grails.org/grails/core" } + mavenCentral() } configurations { @@ -80,7 +71,7 @@ dependencies { console "org.grails:grails-console" profile "org.grails.profiles:web" implementation "org.codehaus.groovy:groovy-dateutil" - runtimeOnly "com.bertramlabs.plugins:asset-pipeline-grails:3.4.6" + runtimeOnly "com.bertramlabs.plugins:asset-pipeline-grails:4.3.0" testImplementation "org.grails.plugins:geb" testImplementation "org.seleniumhq.selenium:selenium-chrome-driver:$seleniumVersion" testImplementation "org.seleniumhq.selenium:selenium-firefox-driver:$seleniumVersion" @@ -94,16 +85,11 @@ dependencies { implementation 'dk.glasius:external-config:3.1.1' runtimeOnly 'org.apache.ant:ant:1.7.1' //you can also use runtime runtimeOnly 'org.apache.ant:ant-launcher:1.7.1' - // implementation 'net.sf.opencsv:opencsv:2.3' implementation 'org.grails.plugins:csv:1.0.ALA.3' implementation 'com.yahoo.platform.yui:yuicompressor:2.4.8' implementation group: 'org.jsoup', name: 'jsoup', version: '1.9.1' - - // implementation 'org.codehaus.groovy.modules.http-builder:http-builder:0.8' - implementation group: 'org.codehaus.groovy.modules.http-builder', name: 'http-builder', version: '0.7.2' - - // implementation 'org.grails.grails-plugin-rest:2.3.0.M2' + implementation group: 'org.codehaus.groovy.modules.http-builder', name: 'http-builder', version: '0.7.2' implementation 'org.codehaus.groovy:groovy-ant:2.0.0' implementation "org.grails.plugins:ala-bootstrap3:4.4.0" @@ -130,11 +116,6 @@ tasks.withType(Test) { systemProperty "webdriver.gecko.driver", System.getProperty('webdriver.gecko.driver') } -webdriverBinaries { - chromedriver "$chromeDriverVersion" - geckodriver "$geckodriverVersion" -} - assets { minifyJs = false diff --git a/gradle.properties b/gradle.properties index 746ffad..aff739e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ -grailsVersion=5.2.1 -gormVersion=7.2.1 +grailsVersion=6.0.0 +grailsGradlePluginVersion=6.0.0 org.gradle.daemon=true org.gradle.parallel=true org.gradle.jvmargs=-Dfile.encoding=UTF-8 -Xmx1024M diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ffed3a2..98debb8 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/grails-app/services/au/org/ala/dashboard/MetadataService.groovy b/grails-app/services/au/org/ala/dashboard/MetadataService.groovy index 7841e4e..813a3e3 100644 --- a/grails-app/services/au/org/ala/dashboard/MetadataService.groovy +++ b/grails-app/services/au/org/ala/dashboard/MetadataService.groovy @@ -285,7 +285,7 @@ class MetadataService { log.info "looking up spatial layers" // look it up def resp = null - def url = "${SPATIAL_URL}/layers.json" + def url = "${SPATIAL_URL}/layers" def conn = new URL(url).openConnection() try { @@ -449,7 +449,7 @@ class MetadataService { def bieBulkLookup(list) { def url = BIE_URL def data = webService.doPost(url, - "/species/guids/bulklookup.json", "", (list as JSON).toString()) + "/species/guids/bulklookup", "", (list as JSON).toString()) //println "returned from doPost ${data.resp}" def results = [:] if (!data.error) { diff --git a/settings.gradle b/settings.gradle index e8b71dc..7c0a8d9 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,3 +1,20 @@ -//include ':ala-bootstrap3' -//project(':ala-bootstrap3').projectDir = new File(settingsDir, '../ala-bootstrap3') +pluginManagement { + repositories { + mavenLocal() + maven { url "https://nexus.ala.org.au/content/groups/public/" } + maven { url "https://repo.grails.org/grails/core" } + mavenCentral() + } + + plugins { + id "org.grails.grails-gradle-plugin" version "6.0.0" + id "org.grails.grails-web" version "6.0.0" + id "org.grails.grails-gsp" version "6.0.0" + id "com.bertramlabs.asset-pipeline" version "4.3.0" + id "org.grails.grails-plugin" version "2.0.13" + + } +} + + rootProject.name='dashboard' diff --git a/src/main/groovy/au/org/ala/dashboard/Constants.groovy b/src/main/groovy/au/org/ala/dashboard/Constants.groovy index 7ee484b..7e93b19 100644 --- a/src/main/groovy/au/org/ala/dashboard/Constants.groovy +++ b/src/main/groovy/au/org/ala/dashboard/Constants.groovy @@ -7,9 +7,9 @@ class Constants { class WebServices { - final static String PARTIAL_URL_STATE_TERRITORY_FACETED_RESULTS = "/occurrences/search.json?pageSize=0&q=*:*&facets=state&flimit=200" + final static String PARTIAL_URL_STATE_TERRITORY_FACETED_RESULTS = "/occurrences/search?pageSize=0&q=*:*&facets=state&flimit=200" - final static String PARTIAL_URL_RECORDS_BY_LIFE_FORM = "/occurrences/search.json?pageSize=0&q=*:*&facets=species_group&flimit=200" + final static String PARTIAL_URL_RECORDS_BY_LIFE_FORM = "/occurrences/search?pageSize=0&q=*:*&facets=species_group&flimit=200" final static String PARTIAL_URL_DATE_STATS_EARLIEST_RECORD = "/occurrences/search?q=!assertions:invalidCollectionDate&pageSize=1&sort=occurrence_date&facet=off"