--- build.gradle.orig	2019-11-17 23:39:22.000000000 +0530
+++ build.gradle	2019-12-07 17:36:42.000000000 +0530
@@ -1,18 +1,15 @@
 buildscript {
     repositories {
         jcenter()
+        flatDir dirs: '/opt/local/share/java/'
     }
     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'
+        classpath ':proguard:'
     }
 }
 
 apply plugin: 'java'
 apply plugin: 'distribution'
-apply plugin: 'edu.sc.seis.launch4j'
-apply plugin: 'nebula.ospackage'
 
 // Common configuration //
 rootProject.version='1.6.5'
@@ -108,48 +105,8 @@
     libraryjars System.getProperty('java.home') + '/jmods/'
 }
 
-// Java executable wrapper for Windows //
-launch4j {
-    createExe.dependsOn 'proguard'
-
-    version = textVersion = project.version
-    fileDescription = productName = 'JD-GUI'
-    errTitle 'JD-GUI Windows Wrapper'
-    copyright 'JD-GUI (C) 2008-2019 Emmanuel Dupuy'
-    icon projectDir.path + '/src/launch4j/resources/images/jd-gui.ico'
-    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 //
+// Distribution for OSX //
 distributions {
     osx.contents {
         into('JD-GUI.app/Contents') {
@@ -168,21 +125,12 @@
         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'
+        into('JD-GUI.app/Contents/Resources') {
+            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
