Skip to content
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

Update and cleanup build #97

Merged
merged 7 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
37 changes: 22 additions & 15 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript {
}

plugins {
id 'com.github.ben-manes.versions' version '0.39.0'
id 'com.github.ben-manes.versions' version '0.51.0'
}

version = projectVersion
Expand All @@ -20,34 +20,36 @@ apply plugin: 'org.grails.grails-plugin'
apply plugin: 'org.grails.internal.grails-plugin-publish'
apply plugin: 'maven-publish'

sourceCompatibility = 11
targetCompatibility = 11

repositories {
maven { url "https://repo.grails.org/grails/core" }
maven { url = 'https://repo.grails.org/grails/core' }
}

configurations {
matrei marked this conversation as resolved.
Show resolved Hide resolved
documentation.extendsFrom compileClasspath
documentation
}

ext.set('selenium.version', seleniumVersion) // Override selenium version from spring-boot-dependencies

dependencies {
api "org.grails:grails-core:$grailsVersion"

compileOnly "org.grails:grails-core:$grailsVersion" // Provided, as this is a Grails plugin

testFixturesApi "org.gebish:geb-spock:$gebVersion", {
exclude group: 'org.codehaus.groovy', module: 'groovy-all'
exclude group: 'org.seleniumhq.selenium', module: 'selenium-api'
exclude group: 'org.codehaus.groovy', module: 'groovy' // Provided by Grails
}
testFixturesApi 'org.grails:grails-testing-support:3.0.0'
testFixturesApi 'org.grails:grails-datastore-gorm:8.0.0'
testFixturesApi "org.grails:grails-testing-support:$grailsTestingSupportVersion"
testFixturesApi "org.grails:grails-datastore-gorm:$gormVersion"
testFixturesApi "org.testcontainers:selenium:$testcontainersVersion"
testFixturesApi "org.seleniumhq.selenium:selenium-chrome-driver:$seleniumVersion"
testFixturesApi "org.seleniumhq.selenium:selenium-remote-driver:$seleniumVersion"

documentation "org.codehaus.groovy:groovy:$groovyVersion"
documentation "org.codehaus.groovy:groovy-ant:$groovyVersion"
documentation "org.codehaus.groovy:groovy-templates:$groovyVersion"
documentation "com.github.javaparser:javaparser-core:3.15.14"
testFixturesCompileOnly "org.slf4j:slf4j-nop:$slf4jVersion" // Remove warning about missing slf4j binding during compilation

documentation "org.codehaus.groovy:groovy:$GroovySystem.version"
documentation "org.codehaus.groovy:groovy-ant:$GroovySystem.version"
documentation "org.codehaus.groovy:groovy-templates:$GroovySystem.version"
documentation "org.codehaus.groovy:groovy-xml:$GroovySystem.version"
documentation "com.github.javaparser:javaparser-core:$javaparserVersion"
}


Expand All @@ -72,6 +74,7 @@ tasks.withType(Groovydoc).configureEach {
destinationDir = layout.buildDirectory.dir('docs/api').get().asFile
docTitle = "Grails Geb Plugin ${version}"
classpath = configurations.documentation
source = files(source, sourceSets.testFixtures.allSource)
}

tasks.withType(Test).configureEach {
Expand All @@ -85,6 +88,10 @@ tasks.withType(Test).configureEach {
}
}

java {
sourceCompatibility = JavaVersion.VERSION_11
}

tasks.named('bootJar') { enabled = false }
matrei marked this conversation as resolved.
Show resolved Hide resolved
tasks.named('bootRun') { enabled = false }
tasks.named('findMainClass') { enabled = false }
16 changes: 10 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
projectVersion=4.1.0-SNAPSHOT
grailsVersion=6.0.0
grailsGradlePluginVersion=6.0.0
groovyVersion=3.0.11
gebVersion=5.1
seleniumVersion=4.1.4
testcontainersVersion=1.20.2

grailsVersion=6.2.2
jdaugherty marked this conversation as resolved.
Show resolved Hide resolved
gebVersion=6.0
grailsGradlePluginVersion=6.2.3
grailsTestingSupportVersion=3.2.2
gormVersion=8.1.2
javaparserVersion=3.26.2
seleniumVersion=4.27.0
slf4jVersion=1.7.36
testcontainersVersion=1.20.4

org.gradle.parallel=true
org.gradle.caching=true
Expand Down
27 changes: 27 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1,28 @@
plugins {
id 'com.gradle.develocity' version '3.18.2'
id 'com.gradle.common-custom-user-data-gradle-plugin' version '2.0.2'
}

def isCI = System.getenv('CI') != null
def isLocal = !isCI
def isAuthenticated = System.getenv('DEVELOCITY_ACCESS_KEY') != null

develocity {
server = 'https://ge.grails.org'
buildScan {
tag('grails')
tag('grails/geb')
publishing.onlyIf { isAuthenticated }
uploadInBackground = isLocal
}
}

buildCache {
local { enabled = isLocal }
remote(develocity.buildCache) {
push = isCI && isAuthenticated
enabled = true
}
}

rootProject.name = 'geb'
105 changes: 52 additions & 53 deletions spock-container-test-app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,67 +1,66 @@
plugins {
id "groovy"
id "org.grails.grails-web"
id "org.grails.grails-gsp"
id "war"
id "idea"
id "com.bertramlabs.asset-pipeline"
id "eclipse"
buildscript {
repositories {
maven { url = 'https://repo.grails.org/grails/core/' }
mavenCentral()
}
dependencies {
classpath "com.bertramlabs.plugins:asset-pipeline-gradle:$assetPipelineVersion"
classpath "org.grails:grails-gradle-plugin:$grailsVersion"
jdaugherty marked this conversation as resolved.
Show resolved Hide resolved
}
}

group = "org.demo.spock"
apply plugin: 'groovy'
apply plugin: 'org.grails.grails-web'
jdaugherty marked this conversation as resolved.
Show resolved Hide resolved
apply plugin: 'org.grails.grails-gsp'
apply plugin: 'com.bertramlabs.asset-pipeline'
jdaugherty marked this conversation as resolved.
Show resolved Hide resolved

group = 'org.demo.spock'

repositories {
maven { url = 'https://repo.grails.org/grails/core' }
mavenCentral()
maven { url "https://repo.grails.org/grails/core/" }
maven { url "https://repository.apache.org/content/repositories/snapshots"}
}

dependencies {
implementation("org.grails:grails-core")
implementation("org.grails:grails-logging")
implementation("org.grails:grails-plugin-databinding")
implementation("org.grails:grails-plugin-i18n")
implementation("org.grails:grails-plugin-interceptors")
implementation("org.grails:grails-plugin-rest")
implementation("org.grails:grails-plugin-services")
implementation("org.grails:grails-plugin-url-mappings")
implementation("org.grails:grails-web-boot")
implementation("org.grails.plugins:gsp")
implementation("org.grails.plugins:hibernate5")
implementation("org.grails.plugins:scaffolding")
implementation("org.hibernate:hibernate-core:5.6.15.Final")
implementation("org.springframework.boot:spring-boot-autoconfigure")
implementation("org.springframework.boot:spring-boot-starter")
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("org.springframework.boot:spring-boot-starter-logging")
implementation("org.springframework.boot:spring-boot-starter-tomcat")
implementation("org.springframework.boot:spring-boot-starter-validation")
compileOnly("io.micronaut:micronaut-inject-groovy")
console("org.grails:grails-console")
runtimeOnly("com.bertramlabs.plugins:asset-pipeline-grails:4.3.0")
runtimeOnly("com.h2database:h2")
runtimeOnly("javax.xml.bind:jaxb-api:2.3.1")
runtimeOnly("org.apache.tomcat:tomcat-jdbc")
runtimeOnly("org.fusesource.jansi:jansi:1.18")
runtimeOnly("org.glassfish.web:el-impl:2.2.1-b05")
testImplementation("io.micronaut:micronaut-inject-groovy")
testImplementation("org.grails:grails-gorm-testing-support")
testImplementation("org.grails:grails-web-testing-support")
testImplementation("org.grails.plugins:geb")
testImplementation("org.spockframework:spock-core")
testImplementation("io.micronaut:micronaut-http-client")

implementation 'org.grails:grails-core'
implementation 'org.grails:grails-logging'
implementation 'org.grails:grails-plugin-databinding'
implementation 'org.grails:grails-plugin-i18n'
implementation 'org.grails:grails-plugin-interceptors'
implementation 'org.grails:grails-plugin-rest'
implementation 'org.grails:grails-plugin-services'
implementation 'org.grails:grails-plugin-url-mappings'
implementation 'org.grails:grails-web-boot'
implementation 'org.grails.plugins:gsp'
implementation 'org.grails.plugins:hibernate5'
implementation 'org.grails.plugins:scaffolding'
implementation 'org.springframework.boot:spring-boot-autoconfigure'
implementation 'org.springframework.boot:spring-boot-starter'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-logging'
implementation 'org.springframework.boot:spring-boot-starter-tomcat'
implementation 'org.springframework.boot:spring-boot-starter-validation'

compileOnly 'io.micronaut:micronaut-inject-groovy'

runtimeOnly "com.bertramlabs.plugins:asset-pipeline-grails:$assetPipelineVersion"
runtimeOnly 'com.h2database:h2'
runtimeOnly 'org.apache.tomcat:tomcat-jdbc'
runtimeOnly 'org.fusesource.jansi:jansi:1.18'

jdaugherty marked this conversation as resolved.
Show resolved Hide resolved
testImplementation 'org.grails:grails-gorm-testing-support'
testImplementation 'org.grails:grails-web-testing-support'
testImplementation 'org.spockframework:spock-core'

integrationTestImplementation testFixtures(project(':geb'))
}

sourceCompatibility = 1.11
targetCompatibility = 1.11
java {
sourceCompatibility = JavaVersion.VERSION_11
}

tasks.withType(Test) {
tasks.withType(Test).configureEach {
useJUnitPlatform()
systemProperty 'grails.geb.recording.mode', 'RECORD_ALL'
}
assets {
minifyJs = true
minifyCss = true
}
systemProperty('grails.geb.recording.mode', 'RECORD_ALL')
}
10 changes: 0 additions & 10 deletions spock-container-test-app/buildSrc/build.gradle

This file was deleted.

6 changes: 4 additions & 2 deletions spock-container-test-app/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
grailsVersion=6.0.0
grailsGradlePluginVersion=6.0.0
version=0.1

grailsVersion=6.2.2
assetPipelineVersion=4.5.2
jdaugherty marked this conversation as resolved.
Show resolved Hide resolved

org.gradle.caching=true
org.gradle.daemon=true
org.gradle.parallel=true
Expand Down
34 changes: 24 additions & 10 deletions spock-container-test-app/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,31 @@
plugins {
id 'com.gradle.develocity' version '3.18.2'
id 'com.gradle.common-custom-user-data-gradle-plugin' version '2.0.2'
}

def isCI = System.getenv('CI') != null
def isLocal = !isCI
def isAuthenticated = System.getenv('DEVELOCITY_ACCESS_KEY') != null

pluginManagement {
repositories {
mavenLocal()
maven { url "https://repo.grails.org/grails/core/" }
gradlePluginPortal()
develocity {
server = 'https://ge.grails.org'
buildScan {
tag('grails')
jdaugherty marked this conversation as resolved.
Show resolved Hide resolved
tag('grails/geb')
publishing.onlyIf { isAuthenticated }
uploadInBackground = isLocal
}
plugins {
id "org.grails.grails-web" version "6.0.0"
id "org.grails.grails-gsp" version "6.0.0"
}

buildCache {
local { enabled = isLocal }
remote(develocity.buildCache) {
push = isCI && isAuthenticated
enabled = true
}
}

rootProject.name="spock-container-test-app"
include 'geb'
rootProject.name = 'spock-container-test-app'

include 'geb'
project(':geb').projectDir = file('..')
Loading