Skip to content

Commit

Permalink
resources jar as a separate project
Browse files Browse the repository at this point in the history
  • Loading branch information
graemerocher committed Feb 21, 2011
1 parent ef56eef commit eccd8ca
Show file tree
Hide file tree
Showing 125 changed files with 84 additions and 2 deletions.
1 change: 1 addition & 0 deletions build.gradle
Expand Up @@ -137,6 +137,7 @@ subprojects {
compile 'xalan:serializer:2.7.1'

// Logging
compile 'log4j:log4j:1.2.16'
compile 'org.slf4j:slf4j-log4j12:1.6.1'
compile 'org.slf4j:slf4j-api:1.6.1'
compile 'org.slf4j:jcl-over-slf4j:1.6.1'
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Expand Up @@ -2,7 +2,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
distributionVersion=0.9
distributionVersion=0.9.2
zipStorePath=wrapper/dists
urlRoot=http\://gradle.artifactoryonline.com/gradle/distributions
distributionName=gradle
Expand Down
4 changes: 4 additions & 0 deletions grails-core/build.gradle
@@ -1,4 +1,8 @@
dependencies {
compile project(":grails-bootstrap"), project(":grails-spring")
}

assemble.doLast {
delete("${buildDir}/classes/main/META-INF")
}
jar.appendix = 'core'
19 changes: 18 additions & 1 deletion grails-docs/build.gradle
Expand Up @@ -3,6 +3,23 @@ dependencies {
compile 'com.lowagie:itext:2.1.7',
'org.xhtmlrenderer:core-renderer:R8pre2'

compile project(":grails-core")
compile project(":grails-core"),project(":grails-bootstrap")
}

task docFilesJar(type: Jar, description: 'Package up files used for generating documentation.') {
version = null
appendix = "doc-files"
from("src/main/template")
doLast {
copy {
from docFilesJar.archivePath
into "${buildDir}/classes/main"
}
}
}

assemble.dependsOn docFilesJar



jar.appendix = 'docs'
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
59 changes: 59 additions & 0 deletions grails-resources/build.gradle
@@ -0,0 +1,59 @@
task createSharedFilesJar(type: Jar, description: 'Package up the files that are shared by both applications and plugins.') {
version = null
appendix = "shared-files"
appFileJar = true
from("src/war/WEB-INF") {
into "web-app/WEB-INF"
include "applicationContext.xml", "sitemesh.xml", "tld/*.tld"
}
from("src/grails/grails-app/conf") {
into "grails-app/conf"
include "DataSource.groovy", "UrlMappings.groovy"
}
}

task createSharedApplicationFilesJar(type: Jar, description: 'Package up the files that are exclusive to applications.') {
version = null
appendix = "app-files"
appFileJar = true
from("src/war") {
into "web-app"
exclude "WEB-INF/**"
}
from("src/grails/grails-app") {
into "grails-app"
exclude "taglib/**", "utils/**", "conf/DataSource.groovy", "conf/UrlMappings.groovy"
}
}

task createSharedPluginFilesJar(type: Jar, description: 'Package up the files that are exclusive to plugins.') {
version = null
appendix = "plugin-files"
appFileJar = true
from("src/grails/templates/plugins")
from("src/grails") {
include "grails-app/conf/BuildConfig.groovy", "grails-app/views/error.gsp"
}
from("src/grails/plugin")
}

task createIntegrationFilesJar(type: Jar, description: 'Files to integrate Grails with IDEs and build systems.') {
version = null
appendix = "integration-files"
appFileJar = true
from("src/grails/templates/ide-support", "src/grails/ant")
}

allJarFileTasks = [createSharedFilesJar,createSharedApplicationFilesJar,createSharedPluginFilesJar,createIntegrationFilesJar]
task resourceJarFiles << {
dependsOn allJarFileTasks
}


jar.dependsOn resourceJarFiles

for(jarTask in allJarFileTasks) {
jar.from(jarTask.archivePath)
}

jar.appendix = 'resources'
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions settings.gradle
Expand Up @@ -7,6 +7,7 @@ include 'grails-bootstrap',
'grails-docs',
'grails-webflow',
'grails-crud',
'grails-resources',

// Plugins
'grails-plugin-url-mappings',
Expand Down

0 comments on commit eccd8ca

Please sign in to comment.