# HG changeset patch # User smith@nwoca.org # Date 1328571634 18000 # Node ID e47f80ef056beff414040f7359f4a67890bc5fee # Parent e9605748e5cec44692e190da562a8dece1e12c01 finish cleanLocal. start adding artifactory plugin diff -r e9605748e5ce -r e47f80ef056b init.gradle --- a/init.gradle Mon Feb 06 15:27:43 2012 -0500 +++ b/init.gradle Mon Feb 06 18:40:34 2012 -0500 @@ -10,12 +10,18 @@ task cleanLocal << { def local = project.repositories.find { it.name == 'local' } - println local if ( local ) { - + local.dirs.each { + logger.info "removing local repo: $it" + it.deleteDir() + } } } + cleanLocal.onlyIf { + project.repositories.find { it.name == 'local' }?.dirs.any { it.exists() } + } + task publishLocal(dependsOn: 'uploadArchives') << { println "published to local repository" } } @@ -23,9 +29,25 @@ class ArtifactoryGradleSettings extends BuildAdapter implements BuildListener { + def void projectsLoaded(Gradle gradle) { + + Project root = gradle.getRootProject() + + root.allprojects { + buildscript { + repositories { + mavenRepo name: 'plugins-repo', url: "http://repos.ssdt.nwoca.org/artifactory/gradle-plugins" + } + dependencies { + classpath(group: 'org.jfrog.buildinfo', name: 'build-info-extractor-gradle', version: '2.0.10') + } + } + } + } def void projectsEvaluated(Gradle gradle) { Project root = gradle.getRootProject() + root.subprojects { configurations.all { @@ -33,12 +55,6 @@ resolutionStrategy.cacheDynamicVersionsFor 120, 'minutes' } - buildscript { - repositories { - mavenRepo name: 'plugins-repo', url: "http://repos.ssdt.nwoca.org/artifactory/gradle-plugins" - } - } - repositories { if (!gradle.bambooBuild) {