Package: libsmali-java / 2.2.6-1

remove-troublesome-jgit-tricks.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
From: Hans-Christoph Steiner <hans@eds.org>
Subject: remove troublesome jgit tricks

This build process uses jgit to add the git commit ID to the version
name used in the filename of the release jars.  That gets in the way
of Debian packaging.

Forwarded: not-needed

--- a/build.gradle
+++ b/build.gradle
@@ -39,22 +39,7 @@
     // for release, because it has some fixes required when running on Android
     jcommanderVersion = 'com.beust:jcommander:1.48'
 
-    def versionSuffix
-    try {
-        def git = org.eclipse.jgit.api.Git.open(file('.'))
-        def head = git.getRepository().getRef('HEAD')
-        versionSuffix = head.getObjectId().abbreviate(8).name()
-
-        if (!git.status().call().clean) {
-            versionSuffix += '-dirty'
-        }
-    } catch (Exception) {
-        // In case we can't get the commit for some reason,
-        // just use -dev
-        versionSuffix = 'dev'
-    }
-
-    version += "-${versionSuffix}"
+    version += "-debian"
 } else {
     jcommanderVersion = 'com.beust:jcommander:1.64'
 }
@@ -180,9 +165,6 @@
     repositories {
         mavenCentral()
     }
-    dependencies {
-        classpath 'org.eclipse.jgit:org.eclipse.jgit:2.0.0.201206130900-r'
-    }
 }
 
 task wrapper(type: Wrapper) {
--- a/smalidea/build.gradle
+++ b/smalidea/build.gradle
@@ -52,23 +52,7 @@
 version = '0.05'
 
 if (!('release' in gradle.startParameter.taskNames)) {
-    def versionSuffix
-    try {
-        def git = org.eclipse.jgit.api.Git.open(file('..'))
-        def head = git.getRepository().getRef('HEAD')
-        versionSuffix = head.getObjectId().abbreviate(8).name()
-
-        if (!git.status().call().clean) {
-            versionSuffix += '-dirty'
-        }
-    } catch (Exception ex) {
-        // In case we can't get the commit for some reason,
-        // just use -dev
-        versionSuffix = 'dev'
-    }
-
-    def baseVersion = version
-    version = baseVersion + '-' + versionSuffix
+    version = baseVersion + '-debian'
 } else {
     if (System.env.JDK7_HOME == null && !JavaVersion.current().isJava7()) {
         throw new InvalidUserDataException("bzzzzzzzt. Release builds must be performed with java 7. " +