|
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 | | - |
41 | 1 | 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") |
175 | 6 | } |
0 commit comments