Auto reformat the entire codebase

This commit is contained in:
Lonami Exo 2019-09-05 16:48:14 +02:00
parent 5e5cfc3d5f
commit c61b4827c1
10 changed files with 136 additions and 134 deletions

View file

@ -41,12 +41,12 @@ task copyAndroidNatives() {
configurations.natives.files.each { jar -> configurations.natives.files.each { jar ->
def outputDir = null def outputDir = null
if(jar.name.endsWith("natives-arm64-v8a.jar")) outputDir = file("libs/arm64-v8a") if (jar.name.endsWith("natives-arm64-v8a.jar")) outputDir = file("libs/arm64-v8a")
if(jar.name.endsWith("natives-armeabi-v7a.jar")) outputDir = file("libs/armeabi-v7a") if (jar.name.endsWith("natives-armeabi-v7a.jar")) outputDir = file("libs/armeabi-v7a")
if(jar.name.endsWith("natives-armeabi.jar")) outputDir = file("libs/armeabi") if (jar.name.endsWith("natives-armeabi.jar")) outputDir = file("libs/armeabi")
if(jar.name.endsWith("natives-x86_64.jar")) outputDir = file("libs/x86_64") if (jar.name.endsWith("natives-x86_64.jar")) outputDir = file("libs/x86_64")
if(jar.name.endsWith("natives-x86.jar")) outputDir = file("libs/x86") if (jar.name.endsWith("natives-x86.jar")) outputDir = file("libs/x86")
if(outputDir != null) { if (outputDir != null) {
copy { copy {
from zipTree(jar) from zipTree(jar)
into outputDir into outputDir
@ -94,7 +94,7 @@ eclipse {
} }
classpath { classpath {
plusConfigurations += [ project.configurations.compile ] plusConfigurations += [project.configurations.compile]
containers 'com.android.ide.eclipse.adt.ANDROID_FRAMEWORK', 'com.android.ide.eclipse.adt.LIBRARIES' containers 'com.android.ide.eclipse.adt.ANDROID_FRAMEWORK', 'com.android.ide.eclipse.adt.LIBRARIES'
} }
@ -113,7 +113,7 @@ eclipse {
idea { idea {
module { module {
sourceDirs += file("src") sourceDirs += file("src")
scopes = [ COMPILE: [plus:[project.configurations.compile]]] scopes = [COMPILE: [plus: [project.configurations.compile]]]
iml { iml {
withXml { withXml {
@ -123,7 +123,7 @@ idea {
builder.component(name: "FacetManager") { builder.component(name: "FacetManager") {
facet(type: "android", name: "Android") { facet(type: "android", name: "Android") {
configuration { configuration {
option(name: "UPDATE_PROPERTY_FILES", value:"true") option(name: "UPDATE_PROPERTY_FILES", value: "true")
} }
} }
} }

View file

@ -24,7 +24,7 @@ import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration;
public class AndroidLauncher extends AndroidApplication { public class AndroidLauncher extends AndroidApplication {
@Override @Override
protected void onCreate (Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
final AndroidApplicationConfiguration config = new AndroidApplicationConfiguration(); final AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
final AndroidShareChallenge shareChallenge = new AndroidShareChallenge(this); final AndroidShareChallenge shareChallenge = new AndroidShareChallenge(this);

View file

@ -3,7 +3,7 @@ apply plugin: "java"
sourceCompatibility = 1.6 sourceCompatibility = 1.6
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8' [compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
sourceSets.main.java.srcDirs = [ "src/" ] sourceSets.main.java.srcDirs = ["src/"]
eclipse.project { eclipse.project {

View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE module PUBLIC
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit trunk//EN" "http://google-web-toolkit.googlecode.com/svn/trunk/distro-source/core/src/gwt-module.dtd"> "-//Google Inc.//DTD Google Web Toolkit trunk//EN"
"http://google-web-toolkit.googlecode.com/svn/trunk/distro-source/core/src/gwt-module.dtd">
<module> <module>
<source path="io/github/lonamiwebs/klooni" /> <source path="io/github/lonamiwebs/klooni" />
</module> </module>

View file

@ -1,7 +1,7 @@
apply plugin: "java" apply plugin: "java"
sourceCompatibility = 1.6 sourceCompatibility = 1.6
sourceSets.main.java.srcDirs = [ "src/" ] sourceSets.main.java.srcDirs = ["src/"]
project.ext.mainClassName = "dev.lonami.klooni.desktop.DesktopLauncher" project.ext.mainClassName = "dev.lonami.klooni.desktop.DesktopLauncher"
project.ext.assetsDir = new File("../android/assets") project.ext.assetsDir = new File("../android/assets")
@ -17,7 +17,7 @@ task run(dependsOn: classes, type: JavaExec) {
task dist(type: Jar) { task dist(type: Jar) {
from files(sourceSets.main.output.classesDirs) from files(sourceSets.main.output.classesDirs)
from files(sourceSets.main.output.resourcesDir) from files(sourceSets.main.output.resourcesDir)
from {configurations.compile.collect {zipTree(it)}} from { configurations.compile.collect { zipTree(it) } }
from files(project.assetsDir) from files(project.assetsDir)
manifest { manifest {
@ -35,13 +35,13 @@ eclipse {
} }
task afterEclipseImport(description: "Post processing after project generation", group: "IDE") { task afterEclipseImport(description: "Post processing after project generation", group: "IDE") {
doLast { doLast {
def classpath = new XmlParser().parse(file(".classpath")) def classpath = new XmlParser().parse(file(".classpath"))
// Result of "new" was being ignored // Result of "new" was being ignored
// new Node(classpath, "classpathentry", [ kind: 'src', path: 'assets' ]); // new Node(classpath, "classpathentry", [ kind: 'src', path: 'assets' ]);
def writer = new FileWriter(file(".classpath")) def writer = new FileWriter(file(".classpath"))
def printer = new XmlNodePrinter(new PrintWriter(writer)) def printer = new XmlNodePrinter(new PrintWriter(writer))
printer.setPreserveWhitespace(true) printer.setPreserveWhitespace(true)
printer.print(classpath) printer.print(classpath)
} }
} }

View file

@ -20,10 +20,11 @@ package dev.lonami.klooni.desktop;
import com.badlogic.gdx.Files; import com.badlogic.gdx.Files;
import com.badlogic.gdx.backends.lwjgl.LwjglApplication; import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration; import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;
import dev.lonami.klooni.Klooni; import dev.lonami.klooni.Klooni;
class DesktopLauncher { class DesktopLauncher {
public static void main (String[] arg) { public static void main(String[] arg) {
LwjglApplicationConfiguration config = new LwjglApplicationConfiguration(); LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
config.title = "Klooni 1010!"; config.title = "Klooni 1010!";
config.width = Klooni.GAME_WIDTH; config.width = Klooni.GAME_WIDTH;

View file

@ -1,59 +1,59 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>${app.name}</string>
<key>CFBundleExecutable</key>
<string>${app.executable}</string>
<key>CFBundleIdentifier</key>
<string>${app.id}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${app.name}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>${app.version}</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>${app.build}</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>UIStatusBarHidden</key>
<true/>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
<string>opengles-2</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>CFBundleIcons</key>
<dict> <dict>
<key>CFBundlePrimaryIcon</key> <key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>${app.name}</string>
<key>CFBundleExecutable</key>
<string>${app.executable}</string>
<key>CFBundleIdentifier</key>
<string>${app.id}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${app.name}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>${app.version}</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>${app.build}</string>
<key>LSRequiresIPhoneOS</key>
<true />
<key>UIViewControllerBasedStatusBarAppearance</key>
<false />
<key>UIStatusBarHidden</key>
<true />
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
<string>opengles-2</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>CFBundleIcons</key>
<dict> <dict>
<key>CFBundleIconFiles</key> <key>CFBundlePrimaryIcon</key>
<array> <dict>
<string>Icon</string> <key>CFBundleIconFiles</key>
<string>Icon-72</string> <array>
</array> <string>Icon</string>
<string>Icon-72</string>
</array>
</dict>
</dict> </dict>
</dict> </dict>
</dict>
</plist> </plist>

View file

@ -1,10 +1,10 @@
sourceSets.main.java.srcDirs = [ "src/" ] sourceSets.main.java.srcDirs = ["src/"]
sourceCompatibility = '1.7' sourceCompatibility = '1.7'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8' [compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
ext { ext {
mainClassName = "dev.lonami.klooni.IOSLauncher" mainClassName = "dev.lonami.klooni.IOSLauncher"
} }
launchIPhoneSimulator.dependsOn build launchIPhoneSimulator.dependsOn build
@ -13,7 +13,7 @@ launchIOSDevice.dependsOn build
createIPA.dependsOn build createIPA.dependsOn build
robovm { robovm {
archs = "thumbv7:arm64" archs = "thumbv7:arm64"
} }
eclipse.project { eclipse.project {

View file

@ -1,47 +1,48 @@
<config> <config>
<executableName>${app.executable}</executableName> <executableName>${app.executable}</executableName>
<mainClass>${app.mainclass}</mainClass> <mainClass>${app.mainclass}</mainClass>
<os>ios</os> <os>ios</os>
<arch>thumbv7</arch> <arch>thumbv7</arch>
<target>ios</target> <target>ios</target>
<iosInfoPList>Info.plist.xml</iosInfoPList> <iosInfoPList>Info.plist.xml</iosInfoPList>
<resources> <resources>
<resource> <resource>
<directory>../android/assets</directory> <directory>../android/assets</directory>
<includes> <includes>
<include>**</include> <include>**</include>
</includes> </includes>
<skipPngCrush>true</skipPngCrush> <skipPngCrush>true</skipPngCrush>
</resource> </resource>
<resource> <resource>
<directory>data</directory> <directory>data</directory>
</resource> </resource>
</resources> </resources>
<forceLinkClasses> <forceLinkClasses>
<pattern>com.badlogic.gdx.scenes.scene2d.ui.*</pattern> <pattern>com.badlogic.gdx.scenes.scene2d.ui.*</pattern>
<pattern>com.badlogic.gdx.graphics.g3d.particles.**</pattern> <pattern>com.badlogic.gdx.graphics.g3d.particles.**</pattern>
<pattern>com.android.okhttp.HttpHandler</pattern> <pattern>com.android.okhttp.HttpHandler</pattern>
<pattern>com.android.okhttp.HttpsHandler</pattern> <pattern>com.android.okhttp.HttpsHandler</pattern>
<pattern>com.android.org.conscrypt.**</pattern> <pattern>com.android.org.conscrypt.**</pattern>
<pattern>com.android.org.bouncycastle.jce.provider.BouncyCastleProvider</pattern> <pattern>com.android.org.bouncycastle.jce.provider.BouncyCastleProvider</pattern>
<pattern>com.android.org.bouncycastle.jcajce.provider.keystore.BC$Mappings</pattern> <pattern>com.android.org.bouncycastle.jcajce.provider.keystore.BC$Mappings</pattern>
<pattern>com.android.org.bouncycastle.jcajce.provider.keystore.bc.BcKeyStoreSpi</pattern> <pattern>com.android.org.bouncycastle.jcajce.provider.keystore.bc.BcKeyStoreSpi</pattern>
<pattern>com.android.org.bouncycastle.jcajce.provider.keystore.bc.BcKeyStoreSpi$Std</pattern> <pattern>com.android.org.bouncycastle.jcajce.provider.keystore.bc.BcKeyStoreSpi$Std
<pattern>com.android.org.bouncycastle.jce.provider.PKIXCertPathValidatorSpi</pattern> </pattern>
<pattern>com.android.org.bouncycastle.crypto.digests.AndroidDigestFactoryOpenSSL</pattern> <pattern>com.android.org.bouncycastle.jce.provider.PKIXCertPathValidatorSpi</pattern>
<pattern>org.apache.harmony.security.provider.cert.DRLCertFactory</pattern> <pattern>com.android.org.bouncycastle.crypto.digests.AndroidDigestFactoryOpenSSL</pattern>
<pattern>org.apache.harmony.security.provider.crypto.CryptoProvider</pattern> <pattern>org.apache.harmony.security.provider.cert.DRLCertFactory</pattern>
</forceLinkClasses> <pattern>org.apache.harmony.security.provider.crypto.CryptoProvider</pattern>
<libs> </forceLinkClasses>
<lib>z</lib> <libs>
</libs> <lib>z</lib>
<frameworks> </libs>
<framework>UIKit</framework> <frameworks>
<framework>OpenGLES</framework> <framework>UIKit</framework>
<framework>QuartzCore</framework> <framework>OpenGLES</framework>
<framework>CoreGraphics</framework> <framework>QuartzCore</framework>
<framework>OpenAL</framework> <framework>CoreGraphics</framework>
<framework>AudioToolbox</framework> <framework>OpenAL</framework>
<framework>AVFoundation</framework> <framework>AudioToolbox</framework>
</frameworks> <framework>AVFoundation</framework>
</frameworks>
</config> </config>

View file

@ -17,12 +17,11 @@
*/ */
package dev.lonami.klooni; package dev.lonami.klooni;
import org.robovm.apple.foundation.NSAutoreleasePool;
import org.robovm.apple.uikit.UIApplication;
import com.badlogic.gdx.backends.iosrobovm.IOSApplication; import com.badlogic.gdx.backends.iosrobovm.IOSApplication;
import com.badlogic.gdx.backends.iosrobovm.IOSApplicationConfiguration; import com.badlogic.gdx.backends.iosrobovm.IOSApplicationConfiguration;
import dev.lonami.klooni.Klooni;
import org.robovm.apple.foundation.NSAutoreleasePool;
import org.robovm.apple.uikit.UIApplication;
class IOSLauncher extends IOSApplication.Delegate { class IOSLauncher extends IOSApplication.Delegate {
@Override @Override