Skip to content

Commit

Permalink
Grails GSP: Update build.gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
rainboyan committed Mar 14, 2023
1 parent 884af9c commit b047d71
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 85 deletions.
4 changes: 2 additions & 2 deletions grails-gsp/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dependencies {
api "org.grails:grails-core:$grailsVersion"
api project(":grails-core")
api project(":grails-taglib")
api "org.codehaus.groovy:groovy-templates:$groovyVersion"
api libs.groovy.templates
}
62 changes: 13 additions & 49 deletions grails-plugin-gsp/build.gradle
Original file line number Diff line number Diff line change
@@ -1,58 +1,22 @@
ext {
isCiBuild = System.getenv().get("TRAVIS") == 'true' || System.getenv().get("CI") as Boolean
}
configurations.all {
resolutionStrategy.dependencySubstitution.all { DependencySubstitution dependency ->
if (dependency.requested instanceof ModuleComponentSelector) {
if (group == 'org.grails' || group == 'org.grails.plugins') {
def targetProject = findProject(":${dependency.requested.module}")
if (targetProject != null) {
dependency.useTarget targetProject
}
}
}
}
}
dependencies {
compileOnly "javax.servlet:javax.servlet-api:$servletApiVersion"
compileOnly libs.javax.servlet
api project(":grails-web-gsp-taglib")

runtimeOnly(project(":grails-web-jsp"))
api "commons-lang:commons-lang:2.6"
api "org.grails:grails-plugin-api:$grailsVersion"
api "org.grails:grails-plugin-codecs:$grailsVersion"
api "org.grails:grails-plugin-url-mappings:$grailsVersion"
astImplementation "org.grails:grails-web:$grailsVersion"
astImplementation "org.grails:grails-plugin-controllers:$grailsVersion"

testImplementation "org.grails:grails-test-support:$grailsVersion"
api libs.commons.lang
api project(":grails-plugin-api")
api project(":grails-plugin-codecs")
api project(":grails-plugin-url-mappings")
// astImplementation project(":grails-web")
// astImplementation project(":grails-plugin-controllers")

testImplementation "javax.servlet.jsp:jsp-api:${jspApiVersion}"
testImplementation "org.springframework:spring-test:$springVersion"
// testImplementation "org.grails:grails-test-support"

testImplementation "taglibs:standard:${jstlVersion}"
testImplementation "javax.servlet:jstl:${jstlVersion}"
// testImplementation "javax.servlet.jsp:jsp-api:${jspApiVersion}"
// testImplementation "org.springframework:spring-test:$springVersion"

testImplementation "org.grails:grails-plugin-codecs:$grailsVersion"
}
// disable main class
bootJar {
mainClass.set('dummy.Application')
}
findMainClass.onlyIf { false }
test {
if (isCiBuild) {
maxParallelForks = 1
forkEvery = 10
}
else {
maxParallelForks = 4
forkEvery = 20
}
// testImplementation "taglibs:standard:${jstlVersion}"
// testImplementation "javax.servlet:jstl:${jstlVersion}"

jvmArgs = ['-Xmx1536M']
afterSuite {
System.out.print('.')
System.out.flush()
}
// testImplementation "org.grails:grails-plugin-codecs"
}
6 changes: 2 additions & 4 deletions grails-taglib/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
dependencies {
api "org.grails:grails-core:$grailsVersion", {
exclude group:'org.grails', module:'grails-spring'
}
api "org.grails:grails-encoder:$grailsVersion"
api project(":grails-core")
api project(":grails-encoder")
}
2 changes: 1 addition & 1 deletion grails-web-gsp-taglib/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dependencies {
compileOnly "javax.servlet:javax.servlet-api:$servletApiVersion"
compileOnly libs.javax.servlet
api project(':grails-web-jsp')
}
17 changes: 7 additions & 10 deletions grails-web-gsp/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
dependencies {
compileOnly "org.apache.ant:ant:${antVersion}"
api "javax.servlet:javax.servlet-api:$servletApiVersion"
compileOnly libs.ant
api libs.javax.servlet
api project(":grails-gsp")
api "org.grails:grails-web-common:$grailsVersion"
api project(":grails-web-common")
api project(":grails-web-taglib")
api project(":grails-web-sitemesh")

api project(":grails-web-sitemesh"), {
exclude group:'org.grails', module:'grails-web-common'
}

testImplementation "org.springframework:spring-test:$springVersion"
testImplementation "org.grails:grails-test:$grailsVersion"
testRuntimeOnly "org.grails:grails-spring:$grailsVersion"
// testImplementation "org.springframework:spring-test:$springVersion"
// testImplementation "org.grails:grails-test:$grailsVersion"
// testRuntimeOnly "org.grails:grails-spring:$grailsVersion"
}
8 changes: 4 additions & 4 deletions grails-web-jsp/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
dependencies {
api "org.grails:grails-web-common:$grailsVersion"
api project(":grails-web-common")
api project(":grails-web-gsp")

compileOnly "javax.servlet:javax.servlet-api:$servletApiVersion"
compileOnly libs.javax.servlet
// Required for JSP support
compileOnly "javax.servlet.jsp:jsp-api:${jspApiVersion}"

compileOnly libs.javax.jsp
compileOnly "javax.el:javax.el-api:3.0.1-b04"
}
8 changes: 4 additions & 4 deletions grails-web-sitemesh/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
dependencies {
api "javax.servlet:javax.servlet-api:$servletApiVersion"
api "org.grails:grails-web-common:$grailsVersion"
api libs.javax.servlet
api project(":grails-web-common")

api "opensymphony:sitemesh:$sitemeshVersion"
api "opensymphony:sitemesh:2.4.2"

testImplementation "org.springframework:spring-test:$springVersion"
testImplementation libs.spring.test
}
15 changes: 4 additions & 11 deletions grails-web-taglib/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
dependencies {
compileOnly "javax.servlet:javax.servlet-api:$servletApiVersion"
api "org.grails:grails-web-common:$grailsVersion"
compileOnly libs.javax.servlet
api project(":grails-web-common")
api project(":grails-taglib")

testRuntimeOnly "org.grails:grails-spring:$grailsVersion"
testImplementation "org.springframework:spring-test:$springVersion"
}

// TODO: Remove this after update to Grails 5.0.0.M2
compileGroovy.doLast {
// unfortunate workaround, since the generated one overrides the one in src/main/resources
final String compileGroovyTargetDir = tasks.compileGroovy.destinationDirectory.getAsFile().getOrNull()?.path ?: "build/classes/groovy/main"
project.delete(compileGroovyTargetDir + "/META-INF/grails.factories")
testRuntimeOnly project(":grails-spring")
testImplementation libs.spring.test
}
8 changes: 8 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,25 @@ include (
'grails-databinding',
'grails-docs',
'grails-encoder',
'grails-gsp',
'grails-logging',
'grails-shell',
'grails-spring',
'grails-spring-boot',
'grails-taglib',
'grails-test',
'grails-test-support',
'grails-util',
'grails-web',
'grails-web-common',
'grails-web-boot',
'grails-web-databinding',
'grails-web-gsp',
'grails-web-gsp-taglib',
'grails-web-jsp',
'grails-web-mvc',
'grails-web-sitemesh',
'grails-web-taglib',
'grails-web-url-mappings',

// POM / BOMs
Expand All @@ -39,6 +46,7 @@ include (
'grails-plugin-datasource',
'grails-plugin-domain-class',
'grails-plugin-dynamic-modules',
'grails-plugin-gsp',
'grails-plugin-interceptors',
'grails-plugin-i18n',
'grails-plugin-management',
Expand Down

0 comments on commit b047d71

Please sign in to comment.