Skip to content

Revert "Grails 5 and tests upgrade" #455

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,13 +191,6 @@ From line 200 in build.gradle, you will find how we pass different test servers

### Usage

**Skip integration test in building process**


./gradlew build -x integrationTest



### Run with Firefox (default):

./gradlew :integrationTest -Dusername=xxxx -Dpassword=xxxxx
Expand All @@ -214,7 +207,6 @@ when authentication is stored into the default file:
**See more: [How to pass authentication](#Authentication)**

### run with Chrome:
This solution is not requried by M2 MBP

./gradlew :integrationTest -Ddriver=chrome

Expand Down
13 changes: 6 additions & 7 deletions _Events.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ import org.apache.commons.io.FileUtils
import org.apache.commons.lang.StringUtils

def build(String baseDir) {
final workdir = new File(baseDir, '')
println 'Starting NPM install within '+workdir
final proc = new ProcessBuilder().inheritIO()
//final proc = new ProcessBuilder().inheritIO().directory(workdir)

final exec = proc.command('npm' , '-dd', 'install').start()
println 'Starting NPM install'
final workdir = new File(baseDir, '')
final proc = new ProcessBuilder().inheritIO().directory(workdir)
final exec = proc.command('npm', '-dd', 'install').start()
def exitValue = exec.waitFor()
if (exitValue) {
println '*****************************************************'
Expand All @@ -16,7 +15,7 @@ def build(String baseDir) {
println "* Exit value: $exitValue *"
println '*****************************************************'
} else {
println 'Completed NPM install.'
println 'Completed NPM install'
}

println 'Copying files to grails-app/assets/node_modules'
Expand Down Expand Up @@ -68,7 +67,7 @@ def build(String baseDir) {
if (exitValue2) {
println '*****************************************************'
println '* `npm run jsdoc` failed'
println "* Exit value: $exitValue2 *"
println "* Exit value: $exitValue *"
println '*****************************************************'
} else {
println 'Completed jsdoc'
Expand Down
118 changes: 50 additions & 68 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ buildscript {
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsVersion"
classpath "gradle.plugin.com.github.erdi.webdriver-binaries:webdriver-binaries-gradle-plugin:2.7"
classpath "com.bertramlabs.plugins:asset-pipeline-gradle:3.4.6"
// classpath 'com.bertramlabs.plugins:asset-pipeline-core:3.2.4'
classpath "gradle.plugin.com.github.erdi.webdriver-binaries:webdriver-binaries-gradle-plugin:2.0"
classpath "com.bertramlabs.plugins:asset-pipeline-gradle:3.3.2"
classpath 'com.bertramlabs.plugins:asset-pipeline-core:2.14.2'
}
}

version "2.0.0-SNAPSHOT"
version "1.1.0-SNAPSHOT"
group "au.org.ala"

apply plugin:"eclipse"
Expand Down Expand Up @@ -50,67 +50,65 @@ configurations {

dependencies {
developmentOnly("org.springframework.boot:spring-boot-devtools")
// compile "org.springframework.boot:spring-boot-starter-logging"
implementation "org.springframework.boot:spring-boot-autoconfigure"
implementation "org.grails:grails-core"
implementation "org.springframework.boot:spring-boot-starter-actuator"
implementation "org.springframework.boot:spring-boot-starter-tomcat"
implementation "org.grails:grails-web-boot"
implementation "org.grails:grails-logging"
implementation "org.grails:grails-plugin-rest"
implementation "org.grails:grails-plugin-databinding"
implementation "org.grails:grails-plugin-i18n"
implementation "org.grails:grails-plugin-services"
implementation "org.grails:grails-plugin-url-mappings"
implementation "org.grails:grails-plugin-interceptors"
implementation "org.grails.plugins:cache"
implementation "org.grails.plugins:async"
implementation "org.grails.plugins:scaffolding"
implementation "org.grails.plugins:events"
implementation "org.grails.plugins:gsp"
implementation "io.micronaut:micronaut-inject-groovy"
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-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:gsp"
compileOnly "io.micronaut:micronaut-inject-groovy"
console "org.grails:grails-console"
profile "org.grails.profiles:web"
runtimeOnly "org.glassfish.web:el-impl:2.1.2-b03"
runtimeOnly "com.h2database:h2"
runtimeOnly "org.apache.tomcat:tomcat-jdbc"
runtimeOnly "javax.xml.bind:jaxb-api:2.3.0"

testImplementation "org.mockito:mockito-core"
testImplementation "org.grails:grails-web-testing-support"
testImplementation "org.grails.plugins:geb"
testRuntimeOnly 'net.sourceforge.htmlunit:htmlunit:2.35.0'
testImplementation "org.seleniumhq.selenium:htmlunit-driver:2.35.1"
testImplementation "org.seleniumhq.selenium:selenium-remote-driver:3.141.59"
testImplementation "org.seleniumhq.selenium:selenium-api:3.141.59"
testImplementation "org.seleniumhq.selenium:selenium-support:3.141.59"
testRuntimeOnly "org.seleniumhq.selenium:selenium-chrome-driver:3.141.59"
testRuntimeOnly "org.seleniumhq.selenium:selenium-firefox-driver:3.141.59"
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.0"

testCompile "org.mockito:mockito-core"
testCompile "org.grails:grails-web-testing-support"
testCompile "org.grails.plugins:geb"
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"

// Additional Plugins
implementation 'dk.glasius:external-config:3.1.1'
implementation 'org.grails.plugins:external-config:2.0.0'
implementation group: 'commons-httpclient', name: 'commons-httpclient', version: '3.1'
implementation group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.4'
implementation group: 'commons-io', name: 'commons-io', version: '2.6'
compile group: 'commons-io', name: 'commons-io', version: '2.6'
implementation group: 'commons-lang', name: 'commons-lang', version: '2.6'

implementation group: "com.bertramlabs.plugins", name: "asset-pipeline-gradle", version: "3.4.6"
implementation group: "com.bertramlabs.plugins", name: "asset-pipeline-gradle", version: "3.0.10"
implementation 'com.bertramlabs.plugins:asset-pipeline-core:2.14.2'

//Angular profile wrapper needs
assets 'com.craigburke.angular:angular-annotate-asset-pipeline:2.4.1'
//Fork version in Atlas
assets "com.craigburke.angular:angular-template-asset-pipeline:2.5.0"
assets "com.craigburke.angular:angular-template-asset-pipeline:2.4.0"

implementation('com.github.ziplet:ziplet:2.0.0') {
compile('com.github.ziplet:ziplet:2.0.0') {
exclude group: 'org.slf4j', module: 'slf4j-nop'
}
implementation "org.grails.plugins:ala-admin-plugin:2.3.0"
implementation "org.grails.plugins:ala-auth:6.0.0"
compile "org.grails.plugins:ala-admin-plugin:2.3.0"

implementation "org.grails.plugins:ala-bootstrap3:4.1.0"
compile "org.grails.plugins:ala-auth:5.1.1"
compile "org.grails.plugins:ala-bootstrap3:4.1.0"

implementation "au.org.ala.plugins.grails:ala-charts-plugin:2.3.0-ANGULAR-SNAPSHOT"
runtimeOnly 'org.grails.plugins:sandbox-hub:1.0'
runtime "au.org.ala.plugins.grails:ala-charts-plugin:2.1-ANGULAR-4"
runtime 'org.grails.plugins:sandbox-hub:1.0'
}

// Set to true it needed only for development
Expand All @@ -120,7 +118,7 @@ if (inplace) {
grails {
exploded = true
plugins {
implementation (project(':ala-charts-plugin')) {
compile (project(':ala-charts-plugin')) {
exclude group: 'org.grails', module: 'grails-plugin-converters'
}
}
Expand Down Expand Up @@ -162,25 +160,11 @@ ext {
}

webdriverBinaries {
driverUrlsConfiguration = resources.text.fromFile('geb-repo-arm64.json') // (2)

chromedriver {
version = '101.0.4951.41'
architecture = 'ARM64'
}
geckodriver {
version = '0.31.0'
}

chromedriver '2.45.0'
geckodriver '0.26.0'
}

tasks.getByName("integrationTest") {
useJUnitPlatform()
description = 'Runs integration tests.'
group = 'verification'
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath

group JavaBasePlugin.VERIFICATION_GROUP
systemProperty "geb.build.reportsDir", reporting.file("geb/$name")
systemProperty "geb.env", System.properties['driver']?:"firefox" // firefox by default
Expand All @@ -194,7 +178,6 @@ tasks.getByName("integrationTest") {
}



tasks.withType(Test) {
maxHeapSize = "1g"
jvmArgs '-XX:MaxMetaspaceSize=512m'
Expand All @@ -204,7 +187,6 @@ tasks.withType(Test) {
}
}


assets {
minifyJs = true
minifyCss = true
Expand Down
19 changes: 0 additions & 19 deletions geb-repo-arm64.json

This file was deleted.

14 changes: 2 additions & 12 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,12 +1,2 @@
grailsVersion=5.2.1
gormVersion=7.2.1
org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.jvmargs=-Dfile.encoding=UTF-8 -Xmx1024M
gebVersion=2.3
groovyVersion=3.0.11
seleniumVersion=3.14.0
webdriverBinariesVersion=2.6
#chromeDriverVersion=2.45.0
geckodriverVersion=0.24.0
seleniumSafariDriverVersion=3.14.0
grailsVersion=4.0.12
org.gradle.jvmargs=-Xmx1024M
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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-5.1.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading