[gradle] 02/02: d/generate_classpath.gradle: Sort classpaths for reproducibility
Kai-Chung Yan
seamlik-guest at moszumanska.debian.org
Sun Jan 17 17:22:13 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 5a304160e7f85809fa71e262e7de86299fce82b5
Author: Kai-Chung Yan <seamlikok at gmail.com>
Date: Mon Jan 18 01:21:22 2016 +0800
d/generate_classpath.gradle: Sort classpaths for reproducibility
---
debian/changelog | 1 +
debian/generate-classpath.gradle | 26 ----------------------
debian/generate_classpath.gradle | 24 ++++++++++++++++++++
.../{generate-pom.gradle => generate_pom.gradle} | 0
debian/patches/generate_classpath.diff | 4 ++--
debian/patches/generate_pom.diff | 6 ++---
6 files changed, 30 insertions(+), 31 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 48d4ee4..6024e35 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,7 @@ gradle (2.10-1) UNRELEASED; urgency=medium
* New upstream release
- Update manpage
* Drop the use of javahelper since it never works well with maven-repo-helper
+ * d/generate_classpath.gradle: Sort classpaths for reproducibility
-- Kai-Chung Yan <seamlikok at gmail.com> Sat, 16 Jan 2016 20:29:38 +0800
diff --git a/debian/generate-classpath.gradle b/debian/generate-classpath.gradle
deleted file mode 100644
index 109ecc4..0000000
--- a/debian/generate-classpath.gradle
+++ /dev/null
@@ -1,26 +0,0 @@
-subprojects {
- apply plugin: 'java'
- jar {
- doFirst {
- if (archivesBaseName != 'gradle-launcher') {
- def propertiesText = file("build/generated-resources/main/${archivesBaseName}-classpath.properties")
- def classpathContent = ""
- propertiesText.eachLine {
- if (it.startsWith('projects')) {
- it.substring(9).split(',').each {
- classpathContent = "${classpathContent} ${it}.jar"
- }
- }
- if (it.startsWith('runtime')) {
- it.substring(8).split(',').each {
- classpathContent = "${classpathContent} ${it}"
- }
- }
- }
- manifest {
- attributes("Class-Path": classpathContent.toString())
- }
- }
- }
- }
-}
\ No newline at end of file
diff --git a/debian/generate_classpath.gradle b/debian/generate_classpath.gradle
new file mode 100644
index 0000000..b9a10b1
--- /dev/null
+++ b/debian/generate_classpath.gradle
@@ -0,0 +1,24 @@
+subprojects {
+ apply plugin: 'java'
+ jar {
+ doFirst {
+ if (archivesBaseName != 'gradle-launcher') {
+ def propertiesFile = file("build/generated-resources/main/${archivesBaseName}-classpath.properties")
+ def classpathContent = new StringBuilder()
+ def classpaths = []
+ propertiesFile.eachLine {
+ if (it.startsWith('projects')) {
+ it.substring(9).split(',').each { classpaths << "${it}.jar" }
+ }
+ if (it.startsWith('runtime')) {
+ it.substring(8).split(',').each { classpaths << it }
+ }
+ }
+ classpaths.toSorted().each { classpathContent << it << ' ' }
+ manifest {
+ attributes('Class-Path': classpathContent.toString())
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/debian/generate-pom.gradle b/debian/generate_pom.gradle
similarity index 100%
rename from debian/generate-pom.gradle
rename to debian/generate_pom.gradle
diff --git a/debian/patches/generate_classpath.diff b/debian/patches/generate_classpath.diff
index 42d1c88..3149c9a 100644
--- a/debian/patches/generate_classpath.diff
+++ b/debian/patches/generate_classpath.diff
@@ -1,5 +1,5 @@
Description:
- generate-classpath.gradle makes every Java libraries auto generate Class-Path
+ generate_classpath.gradle makes every Java libraries auto generate Class-Path
attributes in the manifest.
Gradle uses its own mechanism to manage Jar dependencies through another
file, but providing the Class-Path will help other Java libraries using Gradle
@@ -12,7 +12,7 @@ Lasy-Update: 2015-10-03
}
apply from: 'gradle/buildSplits.gradle'
-+apply from: 'debian/generate-classpath.gradle'
++apply from: 'debian/generate_classpath.gradle'
ext {
jvm = org.gradle.internal.jvm.Jvm.current()
diff --git a/debian/patches/generate_pom.diff b/debian/patches/generate_pom.diff
index dff5807..2de3a80 100644
--- a/debian/patches/generate_pom.diff
+++ b/debian/patches/generate_pom.diff
@@ -1,5 +1,5 @@
Description:
- By default Gradle won't generate POMs for itself. generate-pom.gradle makes
+ By default Gradle won't generate POMs for itself. generate_pom.gradle makes
Gradle auto generate POMs for all of the JARs so that we can install the
POMs to /usr/share/maven-repo
Author: Kai-Chung Yan <seamlikok at gmail.com>
@@ -9,8 +9,8 @@ Last-Updtae: 2015-10-08
@@ -110,6 +110,7 @@
apply from: 'gradle/buildSplits.gradle'
- apply from: 'debian/generate-classpath.gradle'
-+apply from: 'debian/generate-pom.gradle'
+ apply from: 'debian/generate_classpath.gradle'
++apply from: 'debian/generate_pom.gradle'
ext {
jvm = org.gradle.internal.jvm.Jvm.current()
--
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