1
0
mirror of synced 2026-05-22 21:33:16 +00:00

SEC-1906: Update to Gradle 1.0

This commit is contained in:
Rob Winch
2012-06-29 12:59:22 -05:00
parent 2fba10ab61
commit a2452ab514
24 changed files with 202 additions and 244 deletions
+8 -8
View File
@@ -3,8 +3,14 @@ apply plugin: 'groovy'
repositories {
mavenLocal()
mavenCentral()
mavenRepo name: 'SpringSource Enterprise Release', urls: 'http://repository.springsource.com/maven/bundles/release'
mavenRepo name: 'SpringSource Enterprise External', urls: 'http://repository.springsource.com/maven/bundles/external'
maven {
name = 'SpringSource Enterprise Release'
url = 'http://repository.springsource.com/maven/bundles/release'
}
maven {
name = 'SpringSource Enterprise External'
url = 'http://repository.springsource.com/maven/bundles/external'
}
}
// Docbook Plugin
@@ -48,9 +54,3 @@ task ide(type: Copy) {
from configurations.runtime
into 'ide'
}
apply plugin: 'idea'
ideaModule {
excludeDirs += file('.gradle')
}
@@ -12,7 +12,7 @@ import org.gradle.api.GradleException
import org.gradle.plugins.ide.eclipse.GenerateEclipseProject
import org.gradle.plugins.ide.eclipse.GenerateEclipseClasspath
import org.gradle.plugins.ide.eclipse.model.BuildCommand
import org.gradle.tooling.model.ProjectDependency
import org.gradle.plugins.ide.eclipse.model.ProjectDependency
/**
*
@@ -41,7 +41,7 @@ class AspectJPlugin implements Plugin<Project> {
dependsOn project.processResources
sourceSet = project.sourceSets.main
inputs.files(sourceSet.java.srcDirs)
outputs.dir(sourceSet.classesDir)
outputs.dir(sourceSet.output.classesDir)
aspectPath = project.configurations.aspectpath
}
@@ -49,19 +49,19 @@ class AspectJPlugin implements Plugin<Project> {
dependsOn project.processTestResources, project.compileJava, project.jar
sourceSet = project.sourceSets.test
inputs.files(sourceSet.java.srcDirs)
outputs.dir(sourceSet.classesDir)
outputs.dir(sourceSet.output.classesDir)
aspectPath = project.files(project.configurations.aspectpath, project.jar.archivePath)
}
project.tasks.withType(GenerateEclipseProject).all {
whenConfigured { p ->
project.tasks.withType(GenerateEclipseProject) {
project.eclipse.project.file.whenMerged { p ->
p.natures.add(0, 'org.eclipse.ajdt.ui.ajnature')
p.buildCommands = [new BuildCommand('org.eclipse.ajdt.core.ajbuilder',[:])]
p.buildCommands = [new BuildCommand('org.eclipse.ajdt.core.ajbuilder')]
}
}
project.tasks.withType(GenerateEclipseClasspath).all {
whenConfigured { classpath ->
project.tasks.withType(GenerateEclipseClasspath) {
project.eclipse.classpath.file.whenMerged { classpath ->
def entries = classpath.entries.findAll { it instanceof ProjectDependency}.findAll { entry ->
def projectPath = entry.path.replaceAll('/',':')
project.rootProject.findProject(projectPath).plugins.findPlugin(AspectJPlugin)
@@ -86,7 +86,7 @@ class Ajc extends DefaultTask {
def compile() {
logger.info("Running ajc ...")
ant.taskdef(resource: "org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties", classpath: project.configurations.ajtools.asPath)
ant.iajc(classpath: sourceSet.compileClasspath.asPath, fork: 'true', destDir: sourceSet.classesDir.absolutePath,
ant.iajc(classpath: sourceSet.compileClasspath.asPath, fork: 'true', destDir: sourceSet.output.classesDir.absolutePath,
source: project.convention.plugins.java.sourceCompatibility,
target: project.convention.plugins.java.targetCompatibility,
aspectPath: aspectPath.asPath, sourceRootCopyFilter: '**/*.java', showWeaveInfo: 'true') {
@@ -76,7 +76,7 @@ public class Bundlor extends DefaultTask {
manifestTemplate = null
}
inputPaths = project.files(project.sourceSets.main.classesDir)
inputPaths = project.files(project.sourceSets.main.output.classesDir)
if (manifestTemplate != null) {
project.jar.manifest.from manifest