Przeglądaj źródła

Upgrade to gradle 1.0-M3.

Luke Taylor 14 lat temu
rodzic
commit
767f5b2423

+ 1 - 1
build.gradle

@@ -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'
 }

+ 6 - 6
buildSrc/src/main/groovy/aspectj/AspectJPlugin.groovy

@@ -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
 
 /**
  *
@@ -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('/',':')

+ 4 - 4
gradle/ide-integration.gradle

@@ -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.*') ||
@@ -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')) {
@@ -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('/','')
         }

+ 11 - 6
gradle/maven-deployment.gradle

@@ -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')
@@ -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

+ 2 - 2
gradle/wrapper/gradle-wrapper.properties

@@ -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

+ 1 - 1
gradlew

@@ -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