Skip to content

Commit 95ff596

Browse files
committed
Cleanup build scripts
1 parent 15ac24d commit 95ff596

File tree

2 files changed

+16
-107
lines changed

2 files changed

+16
-107
lines changed

build.gradle

Lines changed: 16 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ buildscript {
1717
}
1818
dependencies {
1919
classpath "org.graceframework:grace-gradle-plugin:$graceVersion"
20-
classpath "org.graceframework.plugins:asset-pipeline-gradle:$assetPipelineVersion"
21-
classpath "com.github.erdi:webdriver-binaries-gradle-plugin:$webdriverBinariesVersion"
2220
classpath "io.github.gradle-nexus:publish-plugin:2.0.0"
2321
}
2422
}
@@ -32,7 +30,6 @@ ext {
3230
isCiBuild = project.hasProperty("isCiBuild") || System.getenv().get("CI") as Boolean
3331
isBuildSnapshot = project.version.endsWith("-SNAPSHOT")
3432
isReleaseVersion = !isBuildSnapshot
35-
servletApiVersion = "6.0.0"
3633
}
3734

3835
ext."signing.keyId" = System.getenv("SIGNING_KEY") ?: project.hasProperty("signing.keyId") ? project.getProperty('signing.keyId') : null
@@ -89,101 +86,15 @@ allprojects {
8986
}
9087

9188
subprojects { project ->
92-
if (project.name.startsWith("examples")) {
93-
group = "examples"
94-
95-
apply plugin: 'groovy'
96-
97-
if (project.name.contains('grace')) {
98-
apply plugin: "org.graceframework.grace-web"
99-
apply plugin: "org.graceframework.grace-gsp"
100-
apply plugin: "org.graceframework.asset-pipeline"
101-
}
102-
103-
boolean usesGeb = project.name.contains('grace-hibernate5-mongodb') || project.name.contains('grace-mongodb') || project.name.contains('grace-mongodb-database-per-tenant')|| project.name.contains('grace-rxmongodb')
104-
105-
if (usesGeb) {
106-
apply plugin:"com.github.erdi.webdriver-binaries"
107-
}
108-
109-
if (project.name == "examples-grace-test-data-service") {
110-
apply plugin:"org.graceframework.grace-web"
111-
apply plugin:"org.graceframework.grace-json"
112-
}
113-
114-
if (project.name == "examples-springboot-mongodb") {
115-
apply plugin: 'org.springframework.boot'
116-
apply plugin: 'io.spring.dependency-management'
117-
118-
dependencyManagement {
119-
imports {
120-
mavenBom "org.graceframework:grace-bom:$graceVersion"
121-
}
122-
applyMavenExclusions false
123-
generatedPomCustomization {
124-
enabled = false
125-
}
126-
}
127-
}
128-
129-
dependencies {
130-
testImplementation "org.hibernate.validator:hibernate-validator"
131-
testImplementation "org.apache.groovy:groovy-test-junit5"
132-
testImplementation "org.spockframework:spock-core", { transitive = false }
133-
testImplementation "org.junit.jupiter:junit-jupiter-api"
134-
testImplementation "org.junit.platform:junit-platform-runner"
135-
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine"
136-
}
137-
138-
tasks.withType(Test) {
139-
useJUnitPlatform()
140-
testLogging {
141-
showStandardStreams = true
142-
exceptionFormat = 'full'
143-
}
144-
}
145-
146-
tasks.withType(Jar).configureEach {
147-
duplicatesStrategy = DuplicatesStrategy.INCLUDE
148-
}
149-
150-
return
151-
}
152-
153-
boolean isPluginProject = project.name.startsWith("grace") && project.name.endsWith("-plugin")
154-
155-
apply plugin: 'groovy'
156-
157-
if (isPluginProject) {
158-
group = "org.graceframework.plugins"
159-
version = rootProject.version
160-
161-
apply plugin: "org.graceframework.grace-plugin"
162-
}
163-
else {
164-
group = "org.graceframework"
165-
version = rootProject.version
166-
167-
apply plugin: "io.spring.dependency-management"
168-
169-
dependencyManagement {
170-
imports {
171-
mavenBom "org.graceframework:grace-bom:$graceVersion"
172-
}
173-
applyMavenExclusions false
174-
generatedPomCustomization {
175-
enabled = false
176-
}
177-
}
178-
}
179-
18089
if (project.name == 'docs') {
18190
return
18291
}
18392

93+
apply plugin: 'groovy'
18494
apply plugin: "java-library"
18595
apply plugin: 'maven-publish'
18696
apply plugin: 'signing'
97+
apply plugin: "io.spring.dependency-management"
18798

18899
sourceCompatibility = "17"
189100
targetCompatibility = "17"
@@ -193,6 +104,16 @@ subprojects { project ->
193104
withSourcesJar()
194105
}
195106

107+
dependencyManagement {
108+
imports {
109+
mavenBom "org.graceframework:grace-bom:$graceVersion"
110+
}
111+
applyMavenExclusions false
112+
generatedPomCustomization {
113+
enabled = false
114+
}
115+
}
116+
196117
dependencies {
197118
api "org.apache.groovy:groovy"
198119

@@ -215,10 +136,6 @@ subprojects { project ->
215136
maven(MavenPublication) {
216137
def projectArtifactId = project.name
217138
def projectName = project.name.split('-')*.capitalize().join(' ')
218-
if (project.name == 'grace-plugin') {
219-
projectArtifactId = 'mongodb'
220-
projectName = 'Grace MongoDb Plugin'
221-
}
222139

223140
artifactId projectArtifactId
224141
from components.java
@@ -259,15 +176,6 @@ subprojects { project ->
259176
}
260177
}
261178
}
262-
263-
afterEvaluate {
264-
if (isPluginProject) {
265-
artifact source:"${sourceSets.main.groovy.classesDirectory.get()}/META-INF/grails-plugin.xml",
266-
classifier:"plugin",
267-
extension:'xml'
268-
}
269-
}
270-
271179
}
272180
}
273181
}
@@ -328,3 +236,7 @@ publishGuide {
328236
dependsOn groovydoc
329237
sourceDir = project.file('src/docs')
330238
}
239+
240+
task docs {
241+
dependsOn groovydoc, publishGuide
242+
}

gradle.properties

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
projectVersion=2024.0.0-SNAPSHOT
2-
assetPipelineVersion=7.0.0-M1
32
datastoreVersion=2024.0.0-SNAPSHOT
43
graceVersion=2024.0.0-SNAPSHOT
54
groovyVersion=4.0.29
65
jakartaElVersion=5.0.0
76
jansiVersion=2.4.1
87
javaParserCoreVersion=3.26.4
98
mongodbDriverVersion=5.2.1
10-
seleniumVersion=4.2.2
11-
webdriverBinariesVersion=3.2
129

1310
org.gradle.caching=true
1411
org.gradle.daemon=true

0 commit comments

Comments
 (0)