[gradle] 02/08: d/substituteDependencies.gradle: Do not substitute dynamic versions like 3.x

Kai-Chung Yan seamlik-guest at moszumanska.debian.org
Thu Sep 8 11:24:55 UTC 2016


This is an automated email from the git hooks/post-receive script.

seamlik-guest pushed a commit to branch master
in repository gradle.

commit 0fc428ad6f3ca7df1ad15f5036d1396bc2ff02c5
Author: Kai-Chung Yan (殷啟聰) <seamlikok at gmail.com>
Date:   Thu Sep 8 16:56:26 2016 +0800

    d/substituteDependencies.gradle: Do not substitute dynamic versions like 3.x
---
 debian/patches/34_disable_code_quality.diff |  2 +-
 debian/patches/use_local_artifacts.diff     | 25 +++++++++----------------
 debian/substituteDependencies.gradle        | 11 +++++++----
 3 files changed, 17 insertions(+), 21 deletions(-)

diff --git a/debian/patches/34_disable_code_quality.diff b/debian/patches/34_disable_code_quality.diff
index 79d3036..f45617c 100644
--- a/debian/patches/34_disable_code_quality.diff
+++ b/debian/patches/34_disable_code_quality.diff
@@ -17,7 +17,7 @@ Forwarded: not-needed
  apply plugin: 'idea'
  apply plugin: 'eclipse'
  
-@@ -53,5 +51,4 @@
+@@ -42,5 +40,4 @@
  
  apply from: '../gradle/compile.gradle'
  apply from: '../gradle/taskOrdering.gradle'
diff --git a/debian/patches/use_local_artifacts.diff b/debian/patches/use_local_artifacts.diff
index eb1b081..06286e7 100644
--- a/debian/patches/use_local_artifacts.diff
+++ b/debian/patches/use_local_artifacts.diff
@@ -29,35 +29,28 @@ Last-Update: 2016-09-08
          apply from: "$rootDir/gradle/java9.gradle"
 --- a/buildSrc/build.gradle
 +++ b/buildSrc/build.gradle
-@@ -21,13 +21,25 @@
+@@ -21,16 +21,17 @@
  apply plugin: 'eclipse'
  
  repositories {
 -    maven { url 'https://repo.gradle.org/gradle/libs' }
 -    mavenCentral()
 +    maven { url 'file:///usr/share/maven-repo' }
-+}
-+
-+configurations.all {
-+    resolutionStrategy {
-+      eachDependency { details ->
-+          if (details.requested.name == 'junit') {
-+              details.useVersion '4.x'
-+          } else if (details.requested.group != 'org.gradle' &&
-+              details.requested.name != 'groovy-all') {
-+              details.useVersion 'debian'
-+          }
-+      }
-+  }
  }
  
++apply from: '../debian/substituteDependencies.gradle'
++
  dependencies {
      compile gradleApi()
 -    compile 'com.google.guava:guava-jdk5:14.0.1 at jar'
-+    compile 'com.google.guava:guava:[14.0.1, )'
++    compile 'com.google.guava:guava:debian'
      compile 'commons-lang:commons-lang:2.6 at jar'
      compile localGroovy()
-     testCompile 'junit:junit:4.12 at jar'
+-    testCompile 'junit:junit:4.12 at jar'
++    testCompile 'junit:junit:4.x at jar'
+     testCompile 'org.spockframework:spock-core:1.0-groovy-2.4 at jar', 'cglib:cglib-nodep:2.2', 'org.objenesis:objenesis:1.2'
+ 
+     compile "org.pegdown:pegdown:1.1.0"
 --- a/gradle/dependencies.gradle
 +++ b/gradle/dependencies.gradle
 @@ -34,13 +34,13 @@
diff --git a/debian/substituteDependencies.gradle b/debian/substituteDependencies.gradle
index f350a75..35acdc8 100644
--- a/debian/substituteDependencies.gradle
+++ b/debian/substituteDependencies.gradle
@@ -1,11 +1,14 @@
 configurations.all {
   resolutionStrategy {
     eachDependency { details ->
-      if (details.requested.group != 'org.gradle' &&
-          details.requested.name != 'groovy-all' &&
-          project.name != 'docs') {
-        details.useVersion 'debian'
+      def dependency = details.requested
+      if (dependency.group == 'org.gradle') return
+      if (dependency.version.contains('.x')) return
+      if (dependency.group == 'org.codehaus.plexus' &&
+          dependency.name == 'plexus-component-annotations-1.5') {
+        return
       }
+      details.useVersion 'debian'
     }
   }
 }
\ No newline at end of file

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/gradle.git



More information about the pkg-java-commits mailing list