Skip to content

Commit 08a2505

Browse files
author
freds
committed
repo init uses the new ivyRepo DSL entry
1 parent 8eb6a8a commit 08a2505

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

Diff for: buildSrc/repo-init.gradle

+3-7
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ class ArtifactoryGradleSettings extends BuildAdapter implements BuildListener {
2121

2222
def void projectsLoaded(Gradle gradle) {
2323
Project root = gradle.getRootProject()
24+
if ('buildSrc'.equals(root.name))
25+
return
2426
String artifactoryRoot = 'http://repo.jfrog.org/artifactory'
2527
root.logger.debug("Applying Artifactory to project root ${root.name}")
2628
root.allprojects {
@@ -30,14 +32,8 @@ class ArtifactoryGradleSettings extends BuildAdapter implements BuildListener {
3032
}
3133
}
3234
repositories {
35+
ivyRepo name: 'gradle-ivy', root: "$artifactoryRoot/gradle-ivy"
3336
mavenRepo name: 'libs-repo', urls: "$artifactoryRoot/gradle"
34-
add(new org.apache.ivy.plugins.resolver.IvyRepResolver()) {
35-
name = 'gradle-ivy'
36-
ivyroot = "$artifactoryRoot/gradle-ivy"
37-
artroot = "$artifactoryRoot/gradle-ivy"
38-
ivypattern = '[organisation]/[module]/ivy-[revision].xml'
39-
artpattern = '[organisation]/[module]/[type]s/[artifact]-[revision](-[classifier]).[ext]'
40-
}
4137
}
4238
}
4339
}

0 commit comments

Comments
 (0)