Skip to content

Commit 2aaa2e7

Browse files
committed
Merge grace-geb into the framework
Closes gh-1239
1 parent 77c0c9f commit 2aaa2e7

File tree

5 files changed

+24
-197
lines changed

5 files changed

+24
-197
lines changed

grace-plugin-geb/build.gradle

Lines changed: 4 additions & 173 deletions
Original file line numberDiff line numberDiff line change
@@ -1,175 +1,6 @@
1-
buildscript {
2-
repositories {
3-
// mavenLocal()
4-
mavenCentral()
5-
gradlePluginPortal()
6-
}
7-
dependencies {
8-
classpath "org.graceframework:grace-gradle-plugin:$graceVersion"
9-
classpath "io.github.gradle-nexus:publish-plugin:2.0.0"
10-
}
11-
}
12-
13-
ext."signing.keyId" = project.hasProperty("signing.keyId") ? project.getProperty('signing.keyId') : System.getenv('SIGNING_KEY')
14-
ext."signing.password" = project.hasProperty("signing.password") ? project.getProperty('signing.password') : System.getenv('SIGNING_PASSPHRASE')
15-
ext."signing.secretKeyRingFile" = project.hasProperty("signing.secretKeyRingFile") ? project.getProperty('signing.secretKeyRingFile') : ("${System.properties['user.home']}${File.separator}.gnupg${File.separator}secring.gpg")
16-
ext.isReleaseVersion = !projectVersion.endsWith("SNAPSHOT")
17-
18-
ext['selenium.version'] = '4.27.0'
19-
20-
version = project.projectVersion
21-
group = "org.graceframework.plugins"
22-
23-
apply plugin: "eclipse"
24-
apply plugin: "idea"
25-
apply plugin: "java-library"
26-
apply plugin: "org.graceframework.grace-doc"
27-
apply plugin: "org.graceframework.grace-plugin"
28-
apply plugin: "io.github.gradle-nexus.publish-plugin"
29-
apply plugin: "maven-publish"
30-
apply plugin: "signing"
31-
32-
repositories {
33-
// mavenLocal()
34-
mavenCentral()
35-
}
36-
37-
configurations {
38-
documentation
39-
}
40-
411
dependencies {
42-
api "org.apache.groovy.geb:geb-core:$gebVersion"
43-
api "org.apache.groovy.geb:geb-spock:$gebVersion"
44-
compileOnly "org.graceframework:grace-core"
45-
compileOnly "org.graceframework:grace-boot"
46-
documentation "org.apache.groovy:groovy:$groovyVersion"
47-
documentation "org.apache.groovy:groovy-ant:$groovyVersion"
48-
documentation "org.apache.groovy:groovy-templates:$groovyVersion"
49-
documentation "com.github.javaparser:javaparser-core:$javaParserCoreVersion"
50-
}
51-
52-
java {
53-
toolchain {
54-
languageVersion = JavaLanguageVersion.of(17)
55-
}
56-
withJavadocJar()
57-
withSourcesJar()
58-
}
59-
60-
jar {
61-
enabled = true
62-
archiveClassifier.set('plugin')
63-
includeEmptyDirs = false
64-
}
65-
66-
67-
def cleanTask = project.tasks.findByName('clean')
68-
if (cleanTask == null) {
69-
task clean(type: Delete) {
70-
delete(buildDir)
71-
}
72-
}
73-
else {
74-
cleanTask.doLast {
75-
ant.delete(dir: 'build/docs')
76-
}
77-
}
78-
79-
tasks.withType(Groovydoc) {
80-
group = 'Documentation'
81-
docTitle = "Grace Geb - ${project.version}"
82-
destinationDir = project.file('build/docs/manual/api')
83-
def files = []
84-
project.rootProject.subprojects
85-
.findAll { !it.name != 'docs' && !it.name.startsWith('examples') }
86-
.each { subproject ->
87-
if(subproject.file('src/main/groovy').exists()) {
88-
files += subproject.files('src/main/groovy')
89-
}
90-
if(subproject.file('src/main/java').exists()) {
91-
files += subproject.files('src/main/java')
92-
}
93-
}
94-
if (project.file('src/main/groovy').exists()) {
95-
files += project.files('src/main/groovy')
96-
}
97-
source = files
98-
classpath += configurations.documentation
99-
}
100-
101-
docs {
102-
dependsOn groovydoc
103-
sourceDir = project.file('docs')
104-
}
105-
106-
publishing {
107-
publications {
108-
maven(MavenPublication) {
109-
groupId = project.group
110-
artifactId = project.name
111-
version = project.version
112-
113-
versionMapping {
114-
usage('java-api') {
115-
fromResolutionOf('runtimeClasspath')
116-
}
117-
usage('java-runtime') {
118-
fromResolutionResult()
119-
}
120-
}
121-
122-
from components.java
123-
124-
afterEvaluate {
125-
artifact source: "${project.sourceSets.main.groovy.classesDirectory.get()}/META-INF/grails-plugin.xml",
126-
classifier: "plugin",
127-
extension: 'xml'
128-
}
129-
pom {
130-
name = "Grace Geb Plugin"
131-
description = "Provides Integration with Geb for Functional Testing"
132-
url = 'https://github.com/graceframework/grace-geb'
133-
licenses {
134-
license {
135-
name = 'The Apache License, Version 2.0'
136-
url = 'https://www.apache.org/licenses/LICENSE-2.0.txt'
137-
}
138-
}
139-
developers {
140-
developer {
141-
id = 'rainboyan'
142-
name = 'Michael Yan'
143-
144-
}
145-
}
146-
scm {
147-
connection = 'scm:git:git://github.com/graceframework/grace-geb.git'
148-
developerConnection = 'scm:git:ssh://github.com:graceframework/grace-geb.git'
149-
url = 'https://github.com/graceframework/grace-geb'
150-
}
151-
}
152-
}
153-
}
154-
}
155-
156-
nexusPublishing {
157-
packageGroup = 'org.graceframework.plugins'
158-
repositories {
159-
sonatype {
160-
def mavenUser = System.getenv("MAVEN_CENTRAL_USER") ?: project.hasProperty("mavenCentralUsername") ? project.mavenCentralUsername : ''
161-
def mavenPass = System.getenv("MAVEN_CENTRAL_PASSWORD") ?: project.hasProperty("mavenCentralPassword") ? project.mavenCentralPassword : ''
162-
nexusUrl = uri("https://ossrh-staging-api.central.sonatype.com/service/local/")
163-
snapshotRepositoryUrl = uri("https://central.sonatype.com/repository/maven-snapshots/")
164-
username = mavenUser
165-
password = mavenPass
166-
}
167-
}
168-
}
169-
170-
afterEvaluate {
171-
signing {
172-
required = isReleaseVersion && gradle.taskGraph.hasTask("publish")
173-
sign publishing.publications.maven
174-
}
2+
api libs.geb.core
3+
api libs.geb.spock
4+
implementation project(":grace-plugin-api")
5+
compileOnly project(":grace-core")
1756
}

grace-plugin-geb/src/main/groovy/geb/GebGrailsPlugin.groovy

Lines changed: 0 additions & 24 deletions
This file was deleted.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package grails.plugin.geb
2+
3+
import groovy.transform.CompileStatic
4+
5+
import grails.plugins.Plugin
6+
import grails.util.GrailsUtil
7+
8+
@CompileStatic
9+
class GebGrailsPlugin extends Plugin {
10+
11+
def version = GrailsUtil.getGrailsVersion()
12+
def grailsVersion = '2023.0.0 > *'
13+
def title = 'Grace Geb Plugin'
14+
def description = 'Plugin that adds Geb functional testing code generation features.'
15+
16+
}

gradle/libs.versions.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ commons-lang = "2.6"
1111
commons-lang3 = "3.17.0"
1212
commons-text = "1.13.1"
1313
commons-validator = "1.9.0"
14+
geb = "8.0.0"
1415
glassfish-expressly = "5.0.0"
1516
glassfish-web-jsp-jstl = "3.0.1"
1617
gpars = "1.2.1"
@@ -82,6 +83,8 @@ commons-lang = { module = "commons-lang:commons-lang", version.ref = "commons-la
8283
commons-lang3 = { module = "org.apache.commons:commons-lang3", version.ref = "commons-lang3" }
8384
commons-text = { module = "org.apache.commons:commons-text", version.ref = "commons-text" }
8485
commons-validator = { module = "commons-validator:commons-validator", version.ref = "commons-validator" }
86+
geb-core = { module = "org.apache.groovy.geb:geb-core", version.ref = "geb" }
87+
geb-spock = { module = "org.apache.groovy.geb:geb-spock", version.ref = "geb" }
8588
glassfish-expressly = { module = "org.glassfish.expressly:expressly", version.ref = "glassfish-expressly" }
8689
glassfish-web-jsp-jstl = { module = "org.glassfish.web:jakarta.servlet.jsp.jstl", version.ref = "glassfish-web-jsp-jstl" }
8790
gpars = { module = "org.codehaus.gpars:gpars", version.ref = "gpars" }

settings.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ include (
6060
'grace-plugin-dynamic-modules',
6161
'grace-plugin-events',
6262
'grace-plugin-fields',
63+
'grace-plugin-geb',
6364
'grace-plugin-gsp',
6465
'grace-plugin-interceptors',
6566
'grace-plugin-i18n',

0 commit comments

Comments
 (0)