Skip to content

Commit

Permalink
Grails 7: further work, including getting tests working
Browse files Browse the repository at this point in the history
  • Loading branch information
bkoehm committed Nov 13, 2024
1 parent ad52218 commit 02d50b6
Show file tree
Hide file tree
Showing 76 changed files with 852 additions and 3,158 deletions.
18 changes: 11 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ plugins {
id 'java-library'
}

version = file('version.txt').text.trim()
version = projectVersion
group 'org.grails.plugins'

apply plugin: 'org.grails.grails-plugin'
Expand All @@ -44,17 +44,22 @@ repositories {
maven { url 'https://repo.grails.org/grails/core' }
}

configurations {
all {
exclude group: 'javax.servlet'
subprojects {
configurations {
all {
resolutionStrategy.eachDependency { DependencyResolveDetails details->
if (details.requested.group == 'org.seleniumhq.selenium') {
details.useVersion(seleniumVersion)
}
}
}
}
}

dependencies {

runtimeOnly 'org.grails:grails-web-boot'

api 'org.grails.plugins:spring-security-core:7.0.0-SNAPSHOT'
api "org.grails.plugins:spring-security-core:$grailsSpringSecurityCoreVersion"

api "org.springframework.security:spring-security-ldap:$springSecurityVersion", {
['apacheds-core', 'apacheds-core-entry', 'apacheds-protocol-ldap', 'apacheds-protocol-shared',
Expand All @@ -76,7 +81,6 @@ dependencies {
}

apply from: "${rootProject.projectDir}/gradle/testVerbose.gradle"
apply from: "${rootProject.projectDir}/gradle/groovy-config.gradle"

asciidoctor {
sources {
Expand Down
44 changes: 21 additions & 23 deletions functional-test-app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsVersion"
classpath "gradle.plugin.com.github.erdi.webdriver-binaries:webdriver-binaries-gradle-plugin:2.2"
classpath "com.github.erdi:webdriver-binaries-gradle-plugin:3.2"
classpath "org.grails.plugins:hibernate5:9.0.0-SNAPSHOT"
classpath "com.bertramlabs.plugins:asset-pipeline-gradle:5.0.1"
}
Expand Down Expand Up @@ -49,10 +49,11 @@ dependencies {
implementation "org.hibernate:hibernate-core-jakarta:5.6.15.Final"
implementation "org.grails.plugins:gsp"

implementation "org.grails.plugins:spring-security-ldap:${file('../version.txt').text.trim()}"
implementation 'org.grails.plugins:ldap-server:1.0.0'
implementation project(":")

implementation 'org.apache.directory.server:apacheds-core:1.5.4'
implementation 'org.apache.directory.server:apacheds-protocol-ldap:1.5.4'

compileOnly "io.micronaut:micronaut-inject-groovy"
console "org.grails:grails-console"
profile "org.grails.profiles:web"
runtimeOnly "com.h2database:h2"
Expand All @@ -62,40 +63,37 @@ dependencies {
testImplementation "org.mockito:mockito-core"
testImplementation "org.grails:grails-web-testing-support"
testImplementation "org.grails.plugins:geb"
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"
testImplementation "org.seleniumhq.selenium:htmlunit-driver:2.35.1"
testRuntimeOnly 'net.sourceforge.htmlunit:htmlunit:2.35.0'
testImplementation "org.gebish:geb-core:7.0"
testImplementation "org.gebish:geb-spock:7.0"
testImplementation "org.seleniumhq.selenium:selenium-remote-driver:$seleniumVersion"
testImplementation "org.seleniumhq.selenium:selenium-api:$seleniumVersion"
testImplementation "org.seleniumhq.selenium:selenium-support:$seleniumVersion"
testImplementation "org.spockframework:spock-core"
testRuntimeOnly "org.seleniumhq.selenium:selenium-chrome-driver:$seleniumVersion"
testRuntimeOnly "org.seleniumhq.selenium:selenium-firefox-driver:$seleniumVersion"
testRuntimeOnly "org.seleniumhq.selenium:selenium-safari-driver:$seleniumVersion"
runtimeOnly "org.fusesource.jansi:jansi:1.18"
}

apply from: "../gradle/testVerbose.gradle"
apply from: "../gradle/groovy-config.gradle"

tasks.withType(GroovyCompile) {
configure(groovyOptions) {
forkOptions.jvmArgs = ['-Xmx1024m']
}
}

webdriverBinaries {
chromedriver {
version = '80.0.3987.16'
}
geckodriver {
version = '0.26.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')
if (System.getenv('CHROMEWEBDRIVER')) {
systemProperty 'webdriver.chrome.driver', "${System.getenv('CHROMEWEBDRIVER')}/chromedriver"
}
if (System.getenv('GECKOWEBDRIVER')) {
systemProperty 'webdriver.gecko.driver', "${System.getenv('GECKOWEBDRIVER')}/geckodriver"
}
}


assets {
minifyJs = true
minifyCss = true
Expand Down
5 changes: 0 additions & 5 deletions functional-test-app/gradle.properties

This file was deleted.

Binary file not shown.
6 changes: 0 additions & 6 deletions functional-test-app/gradle/wrapper/gradle-wrapper.properties

This file was deleted.

244 changes: 0 additions & 244 deletions functional-test-app/gradlew

This file was deleted.

Loading

0 comments on commit 02d50b6

Please sign in to comment.