Permalink
Browse files

fixes to building of 'grails-scripts' jar

  • Loading branch information...
1 parent c4e9d6b commit 76e9d1aee1df428410f60245b4350f34e69292b3 @graemerocher graemerocher committed Feb 22, 2011
Showing with 83 additions and 13 deletions.
  1. +9 −13 build.gradle
  2. +74 −0 gradle/assemble.gradle
View
22 build.gradle
@@ -19,19 +19,19 @@ archivesBaseName = 'grails'
repositories {
+ mavenCentral()
mavenRepo urls:"http://maven.springframework.org/release"
}
-sourceSets {
-
- buildScripts {
- compileClasspath = sourceSets.main.compileClasspath + main.classes
- classesDir = "$buildDir/compiled-scripts" as File
- groovy.srcDirs = ['scripts']
- resources.srcDirs = []
- }
+configurations {
+ grailsScripts
+ grailsScripts.transitive = false
}
+antVersion = "1.7.1"
+springVersion = "3.0.3.RELEASE"
+
+
subprojects {
apply plugin: 'groovy'
apply plugin: 'eclipse'
@@ -65,7 +65,6 @@ subprojects {
compile files(fileTree(dir:"$projectDir/src/libs" as File))
// Ant
- def antVersion = "1.7.1"
compile "org.apache.ant:ant:${antVersion}",
"org.apache.ant:ant-launcher:${antVersion}",
"org.apache.ant:ant-junit:${antVersion}",
@@ -141,7 +140,7 @@ subprojects {
'antlr:antlr:2.7.6'
// Spring
- def springVersion = "3.0.3.RELEASE"
+
compile "org.springframework:spring-aop:${springVersion}",
"org.springframework:spring-asm:${springVersion}",
"org.springframework:spring-aspects:${springVersion}",
@@ -185,9 +184,6 @@ configure([compileJava, compileTestJava]) {
apply {
from 'gradle/docs.gradle'
from 'gradle/assemble.gradle'
-/* from 'gradle/unit-test.gradle'
- from 'gradle/maven.gradle'
- from 'gradle/findbugs.gradle'*/
}
clean {
View
74 gradle/assemble.gradle
@@ -1,5 +1,73 @@
import org.apache.tools.ant.filters.ReplaceTokens
+sourceSets {
+
+ buildScripts {
+ def buildScriptsClasspath = sourceSets.main.compileClasspath + configurations.grailsScripts
+ for(subproject in subprojects) {
+ buildScriptsClasspath = buildScriptsClasspath + subproject.sourceSets.main.classes
+ }
+ compileClasspath = buildScriptsClasspath
+ classesDir = "$buildDir/compiled-scripts" as File
+ groovy.srcDirs = ['scripts']
+ resources.srcDirs = []
+ }
+}
+
+
+dependencies {
+ groovy group: 'org.codehaus.groovy', name: 'groovy-all', version: '1.8.0-beta-4'
+
+ // Specs
+ grailsScripts 'javax.servlet:jsp-api:2.0'
+ grailsScripts 'javax.servlet:servlet-api:2.5'
+ grailsScripts 'javax.servlet:jstl:1.2'
+ grailsScripts 'taglibs:standard:1.1.2'
+ grailsScripts 'net.sf.jsr107cache:jsr107cache:1.0'
+ grailsScripts 'javax.transaction:jta:1.1'
+ grailsScripts 'javax.persistence:persistence-api:1.0'
+
+ // Logging
+ grailsScripts 'log4j:log4j:1.2.16'
+ grailsScripts 'org.slf4j:slf4j-log4j12:1.6.1'
+ grailsScripts 'org.slf4j:slf4j-api:1.6.1'
+ grailsScripts 'org.slf4j:jcl-over-slf4j:1.6.1'
+ grailsScripts 'org.slf4j:jul-to-slf4j:1.6.1'
+
+ grailsScripts( 'org.codehaus.gpars:gpars:0.9' ) {
+ exclude module:'netty'
+ }
+ // Apache Commons
+ grailsScripts 'commons-io:commons-io:1.4'
+
+ grailsScripts "org.springframework:spring-context:${springVersion}",
+ "org.springframework:spring-core:${springVersion}",
+ "org.springframework:spring-beans:${springVersion}",
+ "org.springframework:spring-web:${springVersion}",
+ "org.springframework:spring-tx:${springVersion}",
+ "org.springframework:spring-orm:${springVersion}",
+ "org.springframework:spring-test:${springVersion}",
+ 'org.tmatesoft.svnkit:svnkit:1.3.4'
+
+
+ grailsScripts "org.apache.ant:ant:${antVersion}",
+ "org.apache.ant:ant-launcher:${antVersion}",
+ "org.apache.ant:ant-junit:${antVersion}",
+ "org.apache.ant:ant-nodeps:${antVersion}",
+ "org.apache.ant:ant-trax:${antVersion}",
+ "org.apache.ivy:ivy:2.2.0",
+ 'org.codehaus.gant:gant_groovy1.7:1.9.3'
+
+ grailsScripts 'org.hibernate:hibernate-annotations:3.4.0.GA',
+ 'org.hibernate:hibernate-commons-annotations:3.1.0.GA',
+ 'org.hibernate:hibernate-core:3.3.1.GA',
+ 'org.hibernate:hibernate-validator:3.1.0.GA',
+ 'org.hibernate:hibernate-ehcache:3.3.1.GA',
+ 'javassist:javassist:3.11.0.GA',
+ 'antlr:antlr:2.7.6'
+}
+
+
dependencyCache = {
def cacheLocation = new File(gradle.gradleUserHomeDir, "cache")
copy {
@@ -22,6 +90,12 @@ dependencyCache = {
}
+task scriptsJar(type:Jar, dependsOn:compileBuildScriptsGroovy) {
+ appendix = 'scripts'
+ from sourceSets.buildScripts.classes
+ destinationDir = new File('dist')
+}
+
task libs(dependsOn: getTasksByName("jar", true)) {
doFirst dependencyCache

0 comments on commit 76e9d1a

Please sign in to comment.