├── LICENSE ├── README.md ├── build.gradle └── desktop ├── build.gradle ├── config └── packr-minimize.json └── proguard-project.txt /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 Dan McCabe 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # gdx-deploy-sample 2 | Sample Gradle configurations for LibGDX for preparing and deploying release builds 3 | 4 | # Overview 5 | This project includes commands to obfuscate the source using Proguard, generate builds via Packr, set an icon on Windows executables (currently not supported by Packr), and push the builds to itch.io, all in a single command. It is currently setup to generate builds for Windows, Mac, and Linux, with 32-bit and 64-bit variants for Windows and Linux. 6 | 7 | # Setup 8 | 9 | You'll need to download / install some files before getting started, if you don't have them already: 10 | 11 | * Download Proguard: http://proguard.sourceforge.net/ 12 | 13 | * Download Packr: https://github.com/libgdx/packr 14 | 15 | * Download Resource Hacker: http://www.angusj.com/resourcehacker/ 16 | 17 | * Download JDKs: The JDKs used by Packr to generate the executables need to be downloaded separately. You can find Open JDK downloads at https://github.com/alexkasko/openjdk-unofficial-builds. 18 | 19 | * Install Butler: The [gradle-butler-plugin](https://github.com/mini2Dx/gradle-butler-plugin) used by the commands should handle this automatically, or you can install it manually following the instructions at https://itch.io/docs/butler/installing.html. 20 | 21 | In your main build.gradle file, add this under buildscript -> dependencies: 22 | 23 | ```groovy 24 | classpath 'de.undercouch:gradle-download-task:3.1.1' 25 | classpath 'org.mini2Dx:butler:1.0.1' 26 | ``` 27 | 28 | Then under `project(:desktop)`, add: 29 | 30 | ```groovy 31 | apply plugin: "org.mini2Dx.butler" 32 | 33 | butler { 34 | user = "your-itch-io-username" 35 | game = "your-itch-io-game" 36 | } 37 | ``` 38 | 39 | After that, grab the build.gradle file from the desktop folder in this repository and put it in desktop/build.gradle. Once that's in place, you'll need to update the paths for `dekstopWorkingDir` and `utilsDir`, then put proguard.jar, packr.jar and ResourceHacker.exe into the utils folder specified. The JDKs you downloaded will need to go into a folder called "jre" folder in the the utils folder, and you may need to update the pack commands to use the correct JDK versions. You'll also want to replace the various references in this file to Questionable Markup, which was the name of my game. 40 | 41 | Next, add a Proguard configuration file to your LibGDX project under desktop/proguard-project.txt. A sample is included in this repo, although you'll need to update the packages to correspond to class names for your game. 42 | 43 | Then, add a configuration file for Packr in your LibGDX project under desktop/config/packr-minimize.json. There's also a sample of this in the repo files. 44 | 45 | Finally, add the icons you want to use for your Windows / Mac builds to destkop/assets/icons/app-icon.ico and desktop/assets/icons/app-icon.icns, respectively. 46 | 47 | # Obfuscate Code (Proguard) 48 | 49 | Proguard is used to obfuscate your game's source code, which should make it more difficult for others to decompile. To run Proguard and obfuscate your desktop build, execute: 50 | 51 | ``` 52 | gradlew desktop:obfuscate 53 | ``` 54 | 55 | This will invoke `desktop:dist` to ensure you have a build to obfuscate, then run Proguard to obfuscate it. Currently, this assumes that the file generated by `desktop:dist` will be called desktop-1.0.jar. If you changed the version number of your game in your main build.gradle file, you'll probably need to tweak this. 56 | 57 | # Generate Executables (Packr) 58 | 59 | Packr is used to generate an executeable for the jar file. To generate all builds using Packr, execute: 60 | 61 | ``` 62 | gradlew desktop:pack 63 | ``` 64 | 65 | This will take the obfuscated build generated from the previous step as an input. Invoking `pack` will automatically run the `obfuscate` command, so you don't need to execute that separately. You can also run the process individually for each build: 66 | 67 | ``` 68 | gradlew desktop:packWindows32 69 | gradlew desktop:packWindows64 70 | gradlew desktop:packMac 71 | gradlew desktop:packLinux32 72 | gradlew desktop:packLinux64 73 | ``` 74 | 75 | Running the build-specific commands will NOT execute `obfuscate` first. 76 | 77 | # Set Executable Icons (Resource Hacker) 78 | 79 | Packr doesn't currently have the ability to set icons on Windows builds, so we use Resource Hacker to fill that gap. Execute the following to set the icon on both Windows 32 and 64 bit builds: 80 | 81 | ``` 82 | gradlew desktop:setIcon 83 | ``` 84 | 85 | This will invoke all steps up to this point as well. Alternatively, you can also execute the command on each build separately: 86 | 87 | ``` 88 | gradelw desktop:setIconWindows32 89 | gradlew desktop:setIconWindows64 90 | ``` 91 | 92 | Running the build-specific commands will NOT execute `pack` first. 93 | 94 | # Upload to itch.io (Butler) 95 | 96 | Butler is a command-line tool that can be used to upload builds to itch.io. To upload all builds, execute: 97 | 98 | ``` 99 | gradlew desktop:push 100 | ``` 101 | 102 | This will invoke all prior steps as well, so you can use this command to run the entire process. Alternatively, you can also run the command individually for each build: 103 | 104 | ``` 105 | gradlew desktop:pushWindows32 106 | gradlew desktop:pushWindows64 107 | gradlew desktop:pushMac 108 | gradlew desktop:pushLinux32 109 | gradlew desktop:pushLinux64 110 | ``` 111 | 112 | As with the other build-specific commands, these commands will NOT execute any previous steps. 113 | 114 | # Other Output Options 115 | 116 | If you're not using itch.io, you can use the `release` command to run all steps up until that point: 117 | 118 | ``` 119 | gradlew desktop:release 120 | ``` 121 | 122 | This command will essentially do the same thing as `setIcon`, it just puts a prettier name on it. 123 | 124 | # Caveats 125 | * These commands were put together with an extremely limited knowledge of Gradle. I know there's better ways to put together these commands and integrate them into a LibGDX project. This project mainly exists to demonstrate the set of commands I was using to generate and deploy builds, but any suggestions on how to improve things are greatly appreciated! 126 | 127 | * There currently isn't anything setup to check whether or not anything has changed since the last build, so unlike some other LibGDX Gradle commands, all of the commands included here will execute each time they're run, even if the inputs haven't changed. I did some quick research into how to fix this, but I haven't spent enough time with it yet. Any insight would be awesome. 128 | 129 | * I couldn't figure out how to properly re-use some pieces from the Butler plugin, so I threw my hands up and did some copy-pasta to get it working the way I wanted it to. Hopefully someone can come up with a better way to do that. 130 | 131 | * Resource Hacker can only be run from a Windows machine or VM, since it uses Windows APIs to set the icon on the executable. There may be other solutions out there to do this from Mac and Linux, however. 132 | 133 | * This was only built with desktop builds in mind, since that's what I was focused on for my project. Additional work would be needed to apply this to Android, iOS, or HTML builds. 134 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | mavenLocal() 4 | mavenCentral() 5 | maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } 6 | } 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:1.5.0' 9 | classpath 'de.undercouch:gradle-download-task:3.1.1' 10 | classpath 'org.mini2Dx:butler:1.0.1' 11 | } 12 | } 13 | 14 | allprojects { 15 | apply plugin: "eclipse" 16 | apply plugin: "idea" 17 | 18 | version = '1.0' 19 | ext { 20 | appName = "your-game-name" 21 | gdxVersion = '1.9.3' 22 | roboVMVersion = '2.1.0' 23 | } 24 | 25 | repositories { 26 | mavenLocal() 27 | mavenCentral() 28 | maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } 29 | maven { url "https://oss.sonatype.org/content/repositories/releases/" } 30 | } 31 | } 32 | 33 | project(":desktop") { 34 | apply plugin: "java" 35 | apply plugin: "org.mini2Dx.butler" 36 | 37 | dependencies { 38 | compile project(":core") 39 | compile "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion" 40 | compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop" 41 | compile "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-desktop" 42 | } 43 | 44 | butler { 45 | user = "your-itch-username" 46 | game = "your-itch-game" 47 | } 48 | } 49 | 50 | project(":android") { 51 | apply plugin: "android" 52 | 53 | configurations { natives } 54 | 55 | dependencies { 56 | compile project(":core") 57 | compile "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion" 58 | natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi" 59 | natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a" 60 | natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-arm64-v8a" 61 | natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86" 62 | natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86_64" 63 | compile "com.badlogicgames.gdx:gdx-freetype:$gdxVersion" 64 | natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-armeabi" 65 | natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-armeabi-v7a" 66 | natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-arm64-v8a" 67 | natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-x86" 68 | natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-x86_64" 69 | } 70 | } 71 | 72 | project(":ios") { 73 | apply plugin: "java" 74 | 75 | dependencies { 76 | compile project(":core") 77 | compile "com.mobidevelop.robovm:robovm-rt:$roboVMVersion" 78 | compile "com.mobidevelop.robovm:robovm-cocoatouch:$roboVMVersion" 79 | compile "com.badlogicgames.gdx:gdx-backend-robovm:$gdxVersion" 80 | compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios" 81 | compile "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-ios" 82 | } 83 | } 84 | 85 | project(":core") { 86 | apply plugin: "java" 87 | 88 | dependencies { 89 | compile "com.badlogicgames.gdx:gdx:$gdxVersion" 90 | compile "com.badlogicgames.gdx:gdx-freetype:$gdxVersion" 91 | compile "com.esotericsoftware:kryo:4.0.0" 92 | compile ("com.esotericsoftware:kryonet:2.22.0-RC1") { 93 | exclude module : 'kryo' 94 | } 95 | 96 | // mandatory dependencies for using Spock 97 | testCompile "org.codehaus.groovy:groovy-all:2.4.1" 98 | testCompile "org.spockframework:spock-core:1.0-groovy-2.4" 99 | 100 | // optional dependencies for using Spock 101 | testCompile "org.hamcrest:hamcrest-core:1.3" // only necessary if Hamcrest matchers are used 102 | testRuntime "cglib:cglib-nodep:3.1" // allows mocking of classes (in addition to interfaces) 103 | } 104 | } 105 | 106 | tasks.eclipse.doLast { 107 | delete ".project" 108 | } -------------------------------------------------------------------------------- /desktop/build.gradle: -------------------------------------------------------------------------------- 1 | import org.mini2Dx.butler.ButlerUtils; 2 | 3 | apply plugin: "java" 4 | 5 | sourceCompatibility = 1.7 6 | 7 | sourceSets.main.java.srcDirs = [ "src/" ] 8 | 9 | project.ext.mainClassName = "com.darkgravity.questionablemarkup.desktop.DesktopLauncher" 10 | project.ext.assetsDir = new File("../android/assets"); 11 | 12 | def utilsDir() { 13 | "D:/Code/GDX Utils" 14 | } 15 | 16 | def desktopWorkingDir() { 17 | "D:/Code/Java Code/questionable-markup/desktop" 18 | } 19 | 20 | def desktopReleaseDir() { 21 | "build/releases" 22 | } 23 | 24 | def releaseDir(platform) { 25 | desktopReleaseDir() + "/" + platform 26 | } 27 | 28 | task run(dependsOn: classes, type: JavaExec) { 29 | main = project.mainClassName 30 | classpath = sourceSets.main.runtimeClasspath 31 | standardInput = System.in 32 | workingDir = project.assetsDir 33 | ignoreExitValue = true 34 | } 35 | 36 | task dist(type: Jar) { 37 | from files(sourceSets.main.output.classesDir) 38 | from files(sourceSets.main.output.resourcesDir) 39 | from {configurations.compile.collect {zipTree(it)}} 40 | from files(project.assetsDir); 41 | 42 | manifest { 43 | attributes 'Main-Class': project.mainClassName 44 | } 45 | } 46 | 47 | dist.dependsOn classes 48 | 49 | task obfuscate(type: proguard.gradle.ProGuardTask) { 50 | dependsOn 'dist' 51 | configuration files("proguard-project.txt") 52 | libraryjars files("C:/Program Files/Java/jre7/lib/rt.jar", "C:/Program Files/Java/jre7/lib/jce.jar") 53 | injars files("build/libs/desktop-1.0.jar") 54 | outjars files("build/libs/questionable-markup.jar") 55 | } 56 | 57 | def packArgs(platform, jre) { 58 | [ 59 | utilsDir() + "/packr.jar", 60 | "--platform", platform, 61 | "--jdk", utilsDir() + "/jre/" + jre + ".zip", 62 | "--executable", "QuestionableMarkup", 63 | "--classpath", "build/libs/questionable-markup.jar", 64 | "--mainclass", "com.darkgravity.questionablemarkup.desktop.DesktopLauncher", 65 | "--vmargs", "Xmx1G", 66 | "--minimizejre", "config/packr-minimize.json", 67 | "--icon", "assets/icons/app-icon.icns", 68 | "--output", releaseDir(platform) + (platform == "mac" ? "/QuestionableMarkup.app" : "") 69 | ] 70 | } 71 | 72 | task packWindows32(type: JavaExec) { 73 | main = "-jar" 74 | args = packArgs("windows32", "openjdk-1.7.0-u80-unofficial-windows-i586-image") 75 | } 76 | 77 | task packWindows64(type: JavaExec) { 78 | main = "-jar" 79 | args = packArgs("windows64", "openjdk-1.7.0-u80-unofficial-windows-amd64-image") 80 | } 81 | 82 | task packMac(type: JavaExec) { 83 | main = "-jar" 84 | args = packArgs("mac", "openjdk-1.7.0-u45-unofficial-macosx-x86_64-image") 85 | } 86 | 87 | task packLinux32(type: JavaExec) { 88 | main = "-jar" 89 | args = packArgs("linux32", "openjdk-1.7.0-u80-unofficial-linux-i586-image") 90 | } 91 | 92 | task packLinux64(type: JavaExec) { 93 | main = "-jar" 94 | args = packArgs("linux64", "openjdk-1.7.0-u80-unofficial-linux-amd64-image") 95 | } 96 | 97 | task pack { 98 | dependsOn 'obfuscate' 99 | dependsOn 'packWindows32' 100 | dependsOn 'packWindows64' 101 | dependsOn 'packMac' 102 | dependsOn 'packLinux32' 103 | dependsOn 'packLinux64' 104 | tasks.findByName('packWindows32').mustRunAfter 'obfuscate' 105 | tasks.findByName('packWindows64').mustRunAfter 'packWindows32' 106 | tasks.findByName('packMac').mustRunAfter 'packWindows64' 107 | tasks.findByName('packLinux32').mustRunAfter 'packMac' 108 | tasks.findByName('packLinux64').mustRunAfter 'packLinux32' 109 | } 110 | 111 | def setIconArgs(platform) { 112 | [ 113 | "-addoverwrite", 114 | releaseDir(platform) + "/QuestionableMarkup.exe, " + releaseDir(platform) + "/QuestionableMarkup.exe, assets/icons/app-icon.ico, ICONGROUP, ICON_MAINFRAME," 115 | ] 116 | } 117 | 118 | task setIconWindows32(type: Exec) { 119 | workingDir = desktopWorkingDir() 120 | executable = utilsDir() + "/ResourceHacker.exe" 121 | args = setIconArgs("windows32") 122 | } 123 | 124 | task setIconWindows64(type: Exec) { 125 | workingDir = desktopWorkingDir() 126 | executable = utilsDir() + "/ResourceHacker.exe" 127 | args = setIconArgs("windows64") 128 | } 129 | 130 | task setIcon { 131 | dependsOn 'pack' 132 | dependsOn 'setIconWindows32' 133 | dependsOn 'setIconWindows64' 134 | tasks.findByName('setIconWindows32').mustRunAfter 'pack' 135 | tasks.findByName('setIconWindows64').mustRunAfter 'setIconWindows32' 136 | } 137 | 138 | task release { 139 | dependsOn 'dist' 140 | dependsOn 'obfuscate' 141 | dependsOn 'pack' 142 | dependsOn 'setIcon' 143 | tasks.findByName('obfuscate').mustRunAfter 'dist' 144 | tasks.findByName('pack').mustRunAfter 'obfuscate' 145 | tasks.findByName('setIcon').mustRunAfter 'pack' 146 | } 147 | 148 | def getPushCommandLine(platform, channel) { 149 | def osBinDir = desktopWorkingDir() + "/" + releaseDir(platform); 150 | if(osBinDir == null) { 151 | throw new Exception("No steward binary directory set for " + channel) 152 | } 153 | 154 | if(project.getExtensions().findByName('butler').alphaChannel) { 155 | channel += "-alpha" 156 | } else if(project.getExtensions().findByName('butler').betaChannel) { 157 | channel += "-beta" 158 | } 159 | 160 | String user = project.getExtensions().findByName('butler').user 161 | if(user == null) { 162 | throw new Exception("user not set in steward configuration") 163 | } 164 | String game = project.getExtensions().findByName('butler').game 165 | if(game == null) { 166 | throw new Exception("game not set in steward configuration") 167 | } 168 | String deployDetails = user + "/" + game + ":" + channel; 169 | 170 | def args = [ButlerUtils.getButlerBinary(project).getAbsolutePath(), 'push'] 171 | if(project.getExtensions().findByName('butler').userVersion != null) { 172 | args += [releaseDir(platform), deployDetails, "--userversion", project.getExtensions().findByName('butler').userVersion] 173 | } else { 174 | args += [releaseDir(platform), deployDetails] 175 | } 176 | return args 177 | } 178 | 179 | task pushWindows32(type: Exec) { 180 | dependsOn('butlerUpdate') 181 | commandLine getPushCommandLine("windows32", "windows32") 182 | } 183 | 184 | task pushWindows64(type: Exec) { 185 | dependsOn('butlerUpdate') 186 | commandLine getPushCommandLine("windows64", "windows64") 187 | } 188 | 189 | task pushMac(type: Exec) { 190 | dependsOn('butlerUpdate') 191 | commandLine getPushCommandLine("mac", "osx") 192 | } 193 | 194 | task pushLinux32(type: Exec) { 195 | dependsOn('butlerUpdate') 196 | commandLine getPushCommandLine("linux32", "linux32") 197 | } 198 | 199 | task pushLinux64(type: Exec) { 200 | dependsOn('butlerUpdate') 201 | commandLine getPushCommandLine("linux64", "linux64") 202 | } 203 | 204 | task push { 205 | dependsOn 'release' 206 | dependsOn 'pushWindows32' 207 | dependsOn 'pushWindows64' 208 | dependsOn 'pushMac' 209 | dependsOn 'pushLinux32' 210 | dependsOn 'pushLinux64' 211 | tasks.findByName('pushWindows32').mustRunAfter 'release' 212 | tasks.findByName('pushWindows64').mustRunAfter 'pushWindows32' 213 | tasks.findByName('pushMac').mustRunAfter 'pushWindows64' 214 | tasks.findByName('pushLinux32').mustRunAfter 'pushMac' 215 | tasks.findByName('pushLinux64').mustRunAfter 'pushLinux32' 216 | } 217 | 218 | eclipse { 219 | project { 220 | name = appName + "-desktop" 221 | linkedResource name: 'assets', type: '2', location: 'PARENT-1-PROJECT_LOC/android/assets' 222 | } 223 | } 224 | 225 | task afterEclipseImport(description: "Post processing after project generation", group: "IDE") { 226 | doLast { 227 | def classpath = new XmlParser().parse(file(".classpath")) 228 | new Node(classpath, "classpathentry", [ kind: 'src', path: 'assets' ]); 229 | def writer = new FileWriter(file(".classpath")) 230 | def printer = new XmlNodePrinter(new PrintWriter(writer)) 231 | printer.setPreserveWhitespace(true) 232 | printer.print(classpath) 233 | } 234 | } -------------------------------------------------------------------------------- /desktop/config/packr-minimize.json: -------------------------------------------------------------------------------- 1 | { 2 | "reduce": [ 3 | { 4 | "archive": "jre/lib/rt.jar", 5 | "paths": [ 6 | "com/sun/corba", 7 | "com/sun/imageio", 8 | "com/sun/jmx", 9 | "com/sun/jndi", 10 | "com/sun/media", 11 | "com/sun/naming", 12 | "com/sun/rowset", 13 | "com/sun/script", 14 | "javax/imageio", 15 | "javax/management", 16 | "javax/print", 17 | "javax/naming", 18 | "javax/sound", 19 | "javax/sql", 20 | "javax/swing/plaf/nimbus", 21 | "javax/swing/text/htmls", 22 | "sun/applet", 23 | "sun/corba", 24 | "sun/management", 25 | "sun/rmi" 26 | ] 27 | }, 28 | { 29 | "archive": "jre/lib/charsets.jar", 30 | "paths": [ 31 | ] 32 | }, 33 | { 34 | "archive": "jre/lib/jsse.jar", 35 | "paths": [ 36 | ] 37 | }, 38 | { 39 | "archive": "jre/lib/resources.jar", 40 | "paths": [ 41 | "com/sun/corba", 42 | "com/sun/imageio", 43 | "com/sun/jndi", 44 | "com/sun/rowset", 45 | "com/sun/servicetag" 46 | ] 47 | } 48 | ], 49 | "remove": [ 50 | { 51 | "platform": "*", 52 | "paths": [ 53 | "jre/lib/applet", 54 | "jre/lib/charsets.jar", 55 | "jre/lib/ext/localedata.jar", 56 | "jre/lib/rhino.jar", 57 | "jre/lib/management", 58 | "jre/lib/management-agent.jar", 59 | "jre/lib/zi" 60 | ] 61 | }, 62 | { 63 | "platform": "windows", 64 | "paths": [ 65 | "jre/bin/*.exe", 66 | "jre/bin/client" 67 | ] 68 | } 69 | ] 70 | } -------------------------------------------------------------------------------- /desktop/proguard-project.txt: -------------------------------------------------------------------------------- 1 | -verbose 2 | -dontusemixedcaseclassnames 3 | -dontskipnonpubliclibraryclasses 4 | -keepattributes Signature,InnerClasses,SourceFile,LineNumberTable 5 | 6 | -dontwarn com.badlogic.** 7 | -dontwarn org.lwjgl.** 8 | -dontwarn org.objectweb.** 9 | -dontwarn com.esotericsoftware.** 10 | 11 | -keep class com.badlogic.** 12 | -keep class org.lwjgl.** 13 | -keep class org.objectweb.** 14 | -keep class com.esotericsoftware.** 15 | 16 | -keepclassmembers class com.badlogic.** { *; } 17 | -keepclassmembers class org.lwjgl.** { *; } 18 | -keepclassmembers class org.objectweb.** { *; } 19 | -keepclassmembers class com.esotericsoftware.** { *; } 20 | 21 | -keepclasseswithmembernames class * { 22 | native ; 23 | } 24 | 25 | -keepclassmembers enum * { 26 | public static **[] values(); 27 | public static ** valueOf(java.lang.String); 28 | } 29 | 30 | -keep public class com.darkgravity.questionablemarkup.desktop.DesktopLauncher { 31 | public static void main(java.lang.String[]); 32 | } 33 | 34 | -keep class com.darkgravity.questionablemarkup.**.*$*Style { *; } 35 | -keep class com.darkgravity.questionablemarkup.**.Kryo*Serializer { *; } --------------------------------------------------------------------------------