Skip to content

Commit

Permalink
Upgrade to gradle 1.0-M3.
Browse files Browse the repository at this point in the history
  • Loading branch information
tekul committed Apr 27, 2011
1 parent 6c9ab57 commit 767f5b2
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 20 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,5 @@ task uploadDist(type: S3DistroUpload) {
apply from: "$rootDir/gradle/ide-integration.gradle"

task wrapper(type: Wrapper) {
gradleVersion = '1.0-milestone-1'
gradleVersion = '1.0-milestone-3'
}
12 changes: 6 additions & 6 deletions buildSrc/src/main/groovy/aspectj/AspectJPlugin.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import org.gradle.api.tasks.SourceSet
import org.gradle.api.DefaultTask
import org.gradle.api.GradleException

import org.gradle.plugins.eclipse.EclipseClasspath
import org.gradle.plugins.eclipse.EclipseProject
import org.gradle.plugins.eclipse.model.ProjectDependency
import org.gradle.plugins.ide.eclipse.GenerateEclipseClasspath
import org.gradle.plugins.ide.eclipse.model.BuildCommand
import org.gradle.tooling.model.ProjectDependency

/**
*
Expand Down Expand Up @@ -52,14 +52,14 @@ class AspectJPlugin implements Plugin<Project> {
aspectPath = project.files(project.configurations.aspectpath, project.jar.archivePath)
}

project.tasks.withType(EclipseProject).all {
project.tasks.withType(GenerateEclipseClasspath).all {
whenConfigured { p ->
p.natures.add(0, 'org.eclipse.ajdt.ui.ajnature')
p.buildCommands = [new org.gradle.plugins.eclipse.model.BuildCommand('org.eclipse.ajdt.core.ajbuilder',[:])]
p.buildCommands = [new BuildCommand('org.eclipse.ajdt.core.ajbuilder',[:])]
}
}

project.tasks.withType(EclipseClasspath).all {
project.tasks.withType(GenerateEclipseClasspath).all {
whenConfigured { classpath ->
def entries = classpath.entries.findAll { it instanceof ProjectDependency}.findAll { entry ->
def projectPath = entry.path.replaceAll('/',':')
Expand Down
8 changes: 4 additions & 4 deletions gradle/ide-integration.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ configure(javaProjects) {
testOutputDir = "$rootProject.projectDir/intellij/testOut" as File
whenConfigured { module ->
def allClasses = module.dependencies.findAll() { dep ->
if (dep instanceof org.gradle.plugins.idea.model.ModuleLibrary
if (dep instanceof org.gradle.plugins.ide.idea.model.ModuleLibrary
&& dep.classes.find { path ->
path.url.matches('.*jcl-over-slf4j.*') ||
path.url.matches('.*servlet-api.*') ||
Expand All @@ -32,7 +32,7 @@ configure(javaProjects) {
eclipseClasspath.whenConfigured { classpath ->
def includeDeps = project.configurations.getByName('runtime')?.collect { f-> f.absolutePath } as Set
classpath.entries.each { cp ->
if(cp instanceof org.gradle.plugins.eclipse.model.Library) {
if(cp instanceof org.gradle.plugins.ide.eclipse.model.Library) {
def include = includeDeps.contains(cp.path)
def attr = 'org.eclipse.jst.component.dependency'
if(include && project.hasProperty('war')) {
Expand All @@ -49,14 +49,14 @@ configure(javaProjects) {
// GRADLE-1426 (part b)
project.plugins.withType(org.gradle.api.plugins.WarPlugin.class).all {
eclipseWtpComponent.whenConfigured { wtpComp ->
wtpComp.wbModuleEntries.findAll { it instanceof org.gradle.plugins.eclipse.model.WbDependentModule }.each { e ->
wtpComp.wbModuleEntries.findAll { it instanceof org.gradle.plugins.ide.eclipse.model.WbDependentModule }.each { e ->
if(!e.handle.startsWith('module:/resource/')) {
wtpComp.wbModuleEntries.remove(e)
}
}
}
}
tasks.withType(org.gradle.plugins.eclipse.EclipseWtpComponent) {
tasks.withType(org.gradle.plugins.ide.eclipse.GenerateEclipseWtpComponent) {
whenConfigured { wtpComponent ->
wtpComponent.contextPath = project.tasks.findByName('jettyRun')?.contextPath?.replaceFirst('/','')
}
Expand Down
17 changes: 11 additions & 6 deletions gradle/maven-deployment.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,16 @@ uploadArchives {
installer = install.repositories.mavenInstaller

def optionalDeps = ['ehcache', 'log4j', 'apacheds-core', 'jsp-api', 'jsr250-api', 'ldapsdk']
def clogging = new org.apache.maven.model.Dependency()
clogging.artifactId = clogging.groupId = "commons-logging"
clogging.scope = 'compile'
clogging.optional = true
clogging.version = '1.1.1'

// Workaround for GRADLE-1497
def cloggingDep(Class cl) {
clogging = cl.newInstance()
clogging.artifactId = clogging.groupId = "commons-logging"
clogging.scope = 'compile'
clogging.optional = true
clogging.version = '1.1.1'
clogging
}

[installer, deployer]*.pom.collect { pom ->
pom.scopeMappings.addMapping(10, configurations.provided, 'provided')
Expand All @@ -80,7 +85,7 @@ clogging.version = '1.1.1'
dep.groupId.startsWith('org.slf4j')
}*.optional = true

pom.dependencies.add(clogging)
pom.dependencies.add(cloggingDep(pom.dependencies[0].class))

if (pom.artifactId == 'spring-security-config') {
pom.dependencies.find { dep -> dep.artifactId == 'spring-security-web'}.optional = true
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Mar 01 20:16:05 CST 2011
#Wed Apr 27 16:17:28 BST 2011
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://gradle.artifactoryonline.com/gradle/distributions/gradle-1.0-milestone-1-bin.zip
distributionUrl=http\://repo.gradle.org/gradle/distributions/gradle-1.0-milestone-3-bin.zip
2 changes: 1 addition & 1 deletion gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
##############################################################################

# Uncomment those lines to set JVM options. GRADLE_OPTS and JAVA_OPTS can be used together.
GRADLE_OPTS="$GRADLE_OPTS -Xmx512m"
# GRADLE_OPTS="$GRADLE_OPTS -Xmx512m"
# JAVA_OPTS="$JAVA_OPTS -Xmx512m"

GRADLE_APP_NAME=Gradle
Expand Down

0 comments on commit 767f5b2

Please sign in to comment.