summarylogtreecommitdiffstats
path: root/gradle-7-build.patch
blob: f27b0d2772f5ec1a13103a190a99d0dde0cd1cea (plain)
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
diff --git a/app/build.gradle b/app/build.gradle
index 6366e3b..1d281e4 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -2,8 +2,16 @@ apply plugin: 'java'
 
 dependencies {
     provided 'com.yuvimasory:orange-extensions:1.3.0'   // OSX support
-    compile project(':api')
-    runtime project(':services')
+    implementation project(':api')
+    runtimeOnly project(':services')
 }
 
+sourceSets {
+    main {
+        java {
+            srcDir 'src'
+            exclude '**/OsxApp.java'
+        }
+    }
+}
 version = parent.version
diff --git a/build.gradle b/build.gradle
index 5163340..8fd6d27 100644
--- a/build.gradle
+++ b/build.gradle
@@ -3,7 +3,6 @@ buildscript {
         jcenter()
     }
     dependencies {
-        classpath 'com.netflix.nebula:gradle-ospackage-plugin:5.3.0'    // RPM & DEB support
         classpath 'edu.sc.seis.gradle:launch4j:2.4.4'
         classpath 'net.sf.proguard:proguard-gradle:6.1.0'
     }
@@ -12,7 +11,6 @@ buildscript {
 apply plugin: 'java'
 apply plugin: 'distribution'
 apply plugin: 'edu.sc.seis.launch4j'
-apply plugin: 'nebula.ospackage'
 
 // Common configuration //
 rootProject.version='1.6.6'
@@ -63,7 +61,7 @@ jar {
     subprojects.each { subproject ->
         from subproject.sourceSets.main.output.classesDirs
         from subproject.sourceSets.main.output.resourcesDir
-        deps += subproject.configurations.runtime - subproject.configurations.provided
+        deps += subproject.configurations.runtimeClasspath - subproject.configurations.provided
     }
     subprojects.each { subproject ->
         deps -= subproject.jar.archivePath
@@ -120,69 +118,3 @@ launch4j {
     jar projectDir.path + '/' + proguard.outJarFiles[0]
     bundledJrePath = '%JAVA_HOME%'
 }
-
-// Packages for Linux //
-ospackage {
-    buildDeb.dependsOn 'proguard'
-    buildRpm.dependsOn 'proguard'
-
-    license = file('LICENSE')
-    maintainer 'Emmanuel Dupuy <emmanue1@users.noreply.github.com>'
-    os LINUX
-    packageDescription 'JD-GUI, a standalone graphical utility that displays Java sources from CLASS files'
-    packageGroup 'java'
-    packageName project.name
-    release '0'
-    summary 'A Java Decompiler'
-    url 'https://github.com/java-decompiler/jd-gui'
-
-    into '/opt/' + project.name
-    from (proguard.outJarFiles[0]) {
-        fileMode 0755
-    }
-    from ('src/linux/resources/') {
-        fileMode 0755
-    }
-    from 'LICENSE', 'NOTICE', 'README.md'
-
-    postInstall 'cd /opt/' + project.name + '; ln -s ./' + file(proguard.outJarFiles[0]).name + ' ./jd-gui.jar; xdg-icon-resource install --size 128 --novendor ./jd_icon_128.png jd-gui; xdg-desktop-menu install ./*.desktop'
-    preUninstall 'cd /opt/' + project.name + '; rm -f ./jd-gui.jar; rm -fr ./ext; xdg-desktop-menu uninstall ./*.desktop'
-}
-
-// Distributions for OSX and Windows //
-distributions {
-    osx.contents {
-        into('JD-GUI.app/Contents') {
-            from('src/osx/resources') {
-                include 'Info.plist'
-                expand VERSION: project.version,
-                       JAR: file(proguard.outJarFiles[0]).name
-            }
-        }
-        into('JD-GUI.app/Contents/MacOS') {
-            from('src/osx/resources') {
-                include 'universalJavaApplicationStub.sh'
-                fileMode 0755
-            }
-        }
-        into('JD-GUI.app/Contents/Resources/Java') {
-            from proguard.outJarFiles[0]
-        }
-        from 'LICENSE', 'NOTICE', 'README.md'
-    }
-    windows.contents {
-        from 'build/launch4j/jd-gui.exe'
-        from 'LICENSE', 'NOTICE', 'README.md'
-    }
-
-    installWindowsDist.dependsOn createExe
-    windowsDistTar.dependsOn createExe
-    windowsDistZip.dependsOn createExe
-
-    installOsxDist.dependsOn 'proguard'
-    osxDistTar.dependsOn 'proguard'
-    osxDistZip.dependsOn 'proguard'
-}
-
-build.finalizedBy buildDeb
-build.finalizedBy buildRpm
diff --git a/services/build.gradle b/services/build.gradle
index 6ed884b..b8864bc 100644
--- a/services/build.gradle
+++ b/services/build.gradle
@@ -1,11 +1,11 @@
 apply plugin: 'java'
 
 dependencies {
-    compile 'com.fifesoft:rsyntaxtextarea:3.0.4'
-    compile 'org.ow2.asm:asm:7.1'
-    compile 'org.jd:jd-core:' + parent.jdCoreVersion
-    compile project(':api')
-    testCompile 'junit:junit:4.12'
+    implementation 'com.fifesoft:rsyntaxtextarea:3.0.4'
+    implementation 'org.ow2.asm:asm:7.1'
+    implementation 'org.jd:jd-core:' + parent.jdCoreVersion
+    implementation project(':api')
+    testImplementation 'junit:junit:4.12'
 }
 
 version = parent.version
@@ -24,7 +24,7 @@ configurations {
 }
 
 dependencies {
-    compile 'org.antlr:antlr4-runtime:4.5'
+    implementation 'org.antlr:antlr4-runtime:4.5'
     antlr4 'org.antlr:antlr4:4.5'
 }