Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
13969bdd29 | ||
|
|
a3f5583326 | ||
|
|
f137c11c6c | ||
|
|
8d6afbd80d | ||
|
|
c46fa206f6 | ||
|
|
e8da206389 | ||
|
|
b2b8cf2357 | ||
|
|
a4fd88a440 | ||
|
|
a1624f61ae | ||
|
|
5ee26fc3f4 | ||
|
|
93ffb66e59 | ||
|
|
4b9bcfb014 | ||
|
|
a161c09441 | ||
|
|
0c396f76b2 | ||
|
|
b2408b1a7c | ||
|
|
eaa2ad4f05 | ||
|
|
88ce7837a6 | ||
|
|
4054c7d12d | ||
|
|
2d3fd513d8 | ||
|
|
404b593ab8 | ||
|
|
b9f1dea914 | ||
|
|
f3385e6453 | ||
|
|
a2e55f7861 | ||
|
|
761e0114a5 | ||
|
|
dcae128d06 | ||
|
|
a891a8badc | ||
|
|
f3ec5b533e | ||
|
|
d50397edf1 | ||
|
|
49986f22c8 | ||
|
|
70f279d978 | ||
|
|
84c5a75b6c | ||
|
|
97663e87a6 | ||
|
|
5956edcb8e | ||
|
|
7e975f2134 | ||
|
|
40de13f9c7 | ||
|
|
70946539e3 | ||
|
|
996c594dfc | ||
|
|
d8eeb79b63 | ||
|
|
cf61dd0704 | ||
|
|
6fd5f1563a | ||
|
|
3c643c917a | ||
|
|
378be0ef86 | ||
|
|
29e90969eb | ||
|
|
fb724514f3 | ||
|
|
1f11da75d2 | ||
|
|
fcc433fe17 | ||
|
|
617bdf9910 | ||
|
|
3b2aa92eb7 | ||
|
|
4c17b56e28 | ||
|
|
ad13c83f93 | ||
|
|
768d67a8ae | ||
|
|
d827cda395 | ||
|
|
106e6c98a3 | ||
|
|
e7ad797d4e | ||
|
|
6e1fb71194 | ||
|
|
9f5dc7f091 | ||
|
|
57b273639c | ||
|
|
278d690a6b | ||
|
|
c91c0f7b47 | ||
|
|
6a406f4d45 | ||
|
|
eecaa850e0 | ||
|
|
f332332eaa | ||
|
|
79b0e76be0 | ||
|
|
30650efd98 | ||
|
|
b7759c8151 | ||
|
|
0382c35ac0 | ||
|
|
819262c93f | ||
|
|
db60f4bb1c | ||
|
|
7785ca55c2 | ||
|
|
75dcceff43 | ||
|
|
af91979d4c | ||
|
|
52cd4a77dd | ||
|
|
8a1da3c0ed | ||
|
|
9d67c36c32 | ||
|
|
f283709e62 | ||
|
|
5035559b08 | ||
|
|
01e1438382 | ||
|
|
4eee472043 | ||
|
|
5f89a1b9ca | ||
|
|
b9db5ad662 | ||
|
|
5b8084e1fa | ||
|
|
ab67b67e4c | ||
|
|
f825931f92 | ||
|
|
6113edf2ce | ||
|
|
8413443c26 | ||
|
|
f67fb31bc5 | ||
|
|
d321ec5ed1 | ||
|
|
084ae184f9 | ||
|
|
d1ec652f7b | ||
|
|
7a2a6586be | ||
|
|
392dcf3092 | ||
|
|
8a983c784d | ||
|
|
a443263439 | ||
|
|
3e766b9f54 | ||
|
|
89b9501f35 | ||
|
|
816ae84005 | ||
|
|
c0e425cf46 | ||
|
|
9ebb4c7d12 | ||
|
|
46c3b35028 | ||
|
|
ef2b8be726 | ||
|
|
df51078858 | ||
|
|
5783b61631 | ||
|
|
98a53381fb | ||
|
|
daccfa5fe3 | ||
|
|
d82c24616f | ||
|
|
905ca3dcfc | ||
|
|
b4fb687c4f | ||
|
|
39fb2ae5ab | ||
|
|
b40beb0d1d | ||
|
|
4a96b9bb00 | ||
|
|
f83a178982 | ||
|
|
986b4276e1 | ||
|
|
6f6f418ec9 | ||
|
|
1463571cd7 | ||
|
|
7dfb0a81e3 | ||
|
|
9699d9467a | ||
|
|
08a2872527 | ||
|
|
7c81a807ea | ||
|
|
3bf7031e6a | ||
|
|
503fc980f4 | ||
|
|
efed11eb97 | ||
|
|
330820062f | ||
|
|
45d157fe3f |
@@ -1,11 +1,10 @@
|
||||
|
||||
jdk:
|
||||
- openjdk8
|
||||
- openjdk8
|
||||
script:
|
||||
- "git clone --depth=1 --branch=master https://github.com/Anuken/Arc ../Arc"
|
||||
- "./gradlew test"
|
||||
- "./gradlew desktop:dist -Pbuildversion=${TRAVIS_TAG:1}"
|
||||
- "./gradlew server:dist -Pbuildversion=${TRAVIS_TAG:1}"
|
||||
- "git clone --depth=1 --branch=master https://github.com/Anuken/Arc ../Arc"
|
||||
- "./gradlew test"
|
||||
- "./gradlew desktop:dist -Pbuildversion=${TRAVIS_TAG:1}"
|
||||
- "./gradlew server:dist -Pbuildversion=${TRAVIS_TAG:1}"
|
||||
|
||||
deploy:
|
||||
provider: releases
|
||||
@@ -14,8 +13,8 @@ deploy:
|
||||
api_key:
|
||||
secure: Cv5wFtWt62/A24EvSEQvMow7gKPbZ3oATEFPuSghhB2TQz1dA40Zee3Qvk4LFlpLrhYo4K0ZSczCZRGpR+hCd8+Dpww52bheYEvWuh3ZQfvu/fXtEx2j5PwP1qMpmIgSxETV/gkD7l9FImdh0VzktYiAvQfmi0bEocG9/D4QwjFpNat7iwBdcMiw1MvAygpdIWRsjiw0RKlB2mWarmoHhQ7Gu7qlU3j50uaEvcrtmU0pBUPggNQwQRv32i9NPvNFxrqqlUjDLIS8JFea99zCkp8BwYqbEvBIMzd+Qip1/stLJJA3+cDUClbsDtg8rAVetzpOrdLEEBmqShFe5MDl2yEHcsgpN9CFsyTaUfvB3P3rVjizvycMm42IsUkXQiarm5xTQ/TIA8Rd8AHiSKuweNCg1Fd5SFaRtKy8JVLXuxyfUccmyje6hhz2L4lS2Wfj3mAG7sqZUCXhWP79EKdGkiPOjKv4CwXEKmuH3BMVqPlNUZJr9Eg3sV1FG0h2l+MVOOnR635qdUbb49sYojYxVruMLX0BH1c4ZCu230m8CUoWA1Em1QNI75ya7+9Y5T6AsgWDVpBvdUo9fWNbdp+VQ0GskFQsJD5wtnxbcbHeFiERAgGBm7z6qt9u9LrQpBH+dsW52ADvYsu3L4nQEa+sdMHwTTwmGY+iUvsxu0DqxGg=
|
||||
file:
|
||||
- "desktop/build/libs/desktop-release.jar"
|
||||
- "server/build/libs/server-release.jar"
|
||||
- "desktop/build/libs/desktop-release.jar"
|
||||
- "server/build/libs/server-release.jar"
|
||||
on:
|
||||
repo: Anuken/Mindustry
|
||||
tags: true
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="io.anuke.mindustry">
|
||||
package="io.anuke.mindustry">
|
||||
|
||||
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-feature android:glEsVersion="0x00020000" android:required="true"/>
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
|
||||
<application
|
||||
android:resizeableActivity="false"
|
||||
@@ -16,16 +16,16 @@
|
||||
android:appCategory="game"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/GdxTheme" android:fullBackupContent="@xml/backup_rules">
|
||||
<meta-data android:name="android.max_aspect" android:value="2.1" />
|
||||
<meta-data android:name="android.max_aspect" android:value="2.1"/>
|
||||
<activity
|
||||
android:name="io.anuke.mindustry.AndroidLauncher"
|
||||
android:label="@string/app_name"
|
||||
android:screenOrientation="user"
|
||||
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout">
|
||||
android:name="io.anuke.mindustry.AndroidLauncher"
|
||||
android:label="@string/app_name"
|
||||
android:screenOrientation="user"
|
||||
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout">
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
|
||||
<intent-filter>
|
||||
@@ -33,7 +33,7 @@
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
<category android:name="android.intent.category.BROWSABLE"/>
|
||||
<data android:mimeType="application/octet-stream"/>
|
||||
<data android:scheme="file" android:host="*" android:pathPattern=".*\\.mmap" />
|
||||
<data android:scheme="file" android:host="*" android:pathPattern=".*\\.mmap"/>
|
||||
</intent-filter>
|
||||
|
||||
<intent-filter>
|
||||
@@ -41,29 +41,25 @@
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
<category android:name="android.intent.category.BROWSABLE"/>
|
||||
<data android:mimeType="application/octet-stream"/>
|
||||
<data android:scheme="file" android:host="*" android:pathPattern=".*\\.msav" />
|
||||
<data android:scheme="file" android:host="*" android:pathPattern=".*\\.msav"/>
|
||||
</intent-filter>
|
||||
|
||||
|
||||
<intent-filter android:icon="@mipmap/ic_launcher"
|
||||
android:label="Mindustry Map"
|
||||
android:priority="1">
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<data android:scheme="file" android:host="*" android:pathPattern=".*\\.mmap" android:mimeType="*/*" />
|
||||
<action android:name="android.intent.action.VIEW"/>
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
<data android:scheme="file" android:host="*" android:pathPattern=".*\\.mmap" android:mimeType="*/*"/>
|
||||
</intent-filter>
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<data android:scheme="file" android:host="*" android:pathPattern=".*\\.msav" android:mimeType="*/*" />
|
||||
<action android:name="android.intent.action.VIEW"/>
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
<data android:scheme="file" android:host="*" android:pathPattern=".*\\.msav" android:mimeType="*/*"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
|
||||
<activity android:name=".DonationsActivity"
|
||||
android:theme="@style/GdxTheme" />
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
buildscript{
|
||||
repositories{
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
google()
|
||||
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
|
||||
maven{ url "https://oss.sonatype.org/content/repositories/snapshots/" }
|
||||
jcenter()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.3.2'
|
||||
|
||||
dependencies{
|
||||
classpath 'com.android.tools.build:gradle:3.4.0'
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: "com.android.application"
|
||||
|
||||
configurations { natives }
|
||||
configurations{ natives }
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
repositories{
|
||||
mavenCentral()
|
||||
jcenter()
|
||||
maven {
|
||||
url "https://maven.google.com"
|
||||
maven{
|
||||
url "https://maven.google.com"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
dependencies{
|
||||
implementation project(":core")
|
||||
implementation project(":net")
|
||||
|
||||
@@ -46,14 +46,14 @@ task deploy(type: Copy){
|
||||
|
||||
from "build/outputs/apk/release/android-release.apk"
|
||||
into "../deploy/"
|
||||
rename ("android-release.apk", appName + "-android-" + getVersionString() + ".apk")
|
||||
rename("android-release.apk", appName + "-android-" + getVersionString() + ".apk")
|
||||
}
|
||||
|
||||
android {
|
||||
android{
|
||||
buildToolsVersion '28.0.3'
|
||||
compileSdkVersion 28
|
||||
sourceSets {
|
||||
main {
|
||||
sourceSets{
|
||||
main{
|
||||
manifest.srcFile 'AndroidManifest.xml'
|
||||
java.srcDirs = ['src']
|
||||
aidl.srcDirs = ['src']
|
||||
@@ -65,11 +65,11 @@ android {
|
||||
|
||||
androidTest.setRoot('tests')
|
||||
}
|
||||
packagingOptions {
|
||||
packagingOptions{
|
||||
exclude 'META-INF/robovm/ios/robovm.xml'
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
defaultConfig{
|
||||
def vfile = file('../core/assets/version.properties')
|
||||
|
||||
def code = 0
|
||||
@@ -93,16 +93,16 @@ android {
|
||||
versionName versionNameResult
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
compileOptions{
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
flavorDimensions "google"
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
if(project.hasProperty("RELEASE_STORE_FILE")) {
|
||||
signingConfigs{
|
||||
release{
|
||||
if(project.hasProperty("RELEASE_STORE_FILE")){
|
||||
storeFile file(RELEASE_STORE_FILE)
|
||||
storePassword RELEASE_STORE_PASSWORD
|
||||
keyAlias RELEASE_KEY_ALIAS
|
||||
@@ -113,8 +113,8 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
buildTypes{
|
||||
release{
|
||||
signingConfig signingConfigs.release
|
||||
}
|
||||
}
|
||||
@@ -122,22 +122,22 @@ android {
|
||||
// called every time gradle gets executed, takes the native dependencies of
|
||||
// the natives configuration, and extracts them to the proper libs/ folders
|
||||
// so they get packed with the APK.
|
||||
task copyAndroidNatives() {
|
||||
task copyAndroidNatives(){
|
||||
file("libs/armeabi/").mkdirs()
|
||||
file("libs/armeabi-v7a/").mkdirs()
|
||||
file("libs/arm64-v8a/").mkdirs()
|
||||
file("libs/x86_64/").mkdirs()
|
||||
file("libs/x86/").mkdirs()
|
||||
|
||||
configurations.natives.files.each { jar ->
|
||||
configurations.natives.files.each{ jar ->
|
||||
def outputDir = null
|
||||
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.jar")) outputDir = file("libs/armeabi")
|
||||
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 (outputDir != null) {
|
||||
copy {
|
||||
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.jar")) outputDir = file("libs/armeabi")
|
||||
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(outputDir != null){
|
||||
copy{
|
||||
from zipTree(jar)
|
||||
into outputDir
|
||||
include "*.so"
|
||||
@@ -146,21 +146,21 @@ task copyAndroidNatives() {
|
||||
}
|
||||
}
|
||||
|
||||
task run(type: Exec) {
|
||||
task run(type: Exec){
|
||||
def path
|
||||
def localProperties = project.file("../local.properties")
|
||||
if (localProperties.exists()) {
|
||||
if(localProperties.exists()){
|
||||
Properties properties = new Properties()
|
||||
localProperties.withInputStream { instr ->
|
||||
localProperties.withInputStream{ instr ->
|
||||
properties.load(instr)
|
||||
}
|
||||
def sdkDir = properties.getProperty('sdk.dir')
|
||||
if (sdkDir) {
|
||||
if(sdkDir){
|
||||
path = sdkDir
|
||||
} else {
|
||||
}else{
|
||||
path = "$System.env.ANDROID_HOME"
|
||||
}
|
||||
} else {
|
||||
}else{
|
||||
path = "$System.env.ANDROID_HOME"
|
||||
}
|
||||
|
||||
@@ -169,19 +169,19 @@ task run(type: Exec) {
|
||||
}
|
||||
|
||||
// sets up the Android Idea project, using the old Ant based build.
|
||||
idea {
|
||||
module {
|
||||
idea{
|
||||
module{
|
||||
sourceDirs += file("src")
|
||||
scopes = [COMPILE: [plus: [project.configurations.compile]]]
|
||||
|
||||
iml {
|
||||
withXml {
|
||||
iml{
|
||||
withXml{
|
||||
def node = it.asNode()
|
||||
def builder = NodeBuilder.newInstance()
|
||||
builder.current = node
|
||||
builder.component(name: "FacetManager") {
|
||||
facet(type: "android", name: "Android") {
|
||||
configuration {
|
||||
builder.component(name: "FacetManager"){
|
||||
facet(type: "android", name: "Android"){
|
||||
configuration{
|
||||
option(name: "UPDATE_PROPERTY_FILES", value: "true")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,5 @@
|
||||
#
|
||||
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
|
||||
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
|
||||
|
||||
# Project target.
|
||||
target=android-19
|
||||
|
||||
@@ -18,18 +18,15 @@ import io.anuke.arc.function.Consumer;
|
||||
import io.anuke.arc.scene.ui.layout.Unit;
|
||||
import io.anuke.arc.util.Strings;
|
||||
import io.anuke.arc.util.serialization.Base64Coder;
|
||||
import io.anuke.net.KryoClient;
|
||||
import io.anuke.net.KryoServer;
|
||||
import io.anuke.mindustry.core.Platform;
|
||||
import io.anuke.mindustry.game.Saves.SaveSlot;
|
||||
import io.anuke.mindustry.io.SaveIO;
|
||||
import io.anuke.mindustry.net.Net;
|
||||
import io.anuke.mindustry.ui.dialogs.FileChooser;
|
||||
import io.anuke.mindustry.net.ArcNetClient;
|
||||
import io.anuke.mindustry.net.ArcNetServer;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.*;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import static io.anuke.mindustry.Vars.*;
|
||||
@@ -59,7 +56,7 @@ public class AndroidLauncher extends AndroidApplication{
|
||||
int len = s.length();
|
||||
byte[] data = new byte[len / 2];
|
||||
for(int i = 0; i < len; i += 2){
|
||||
data[i / 2] = (byte) ((Character.digit(s.charAt(i), 16) << 4)
|
||||
data[i / 2] = (byte)((Character.digit(s.charAt(i), 16) << 4)
|
||||
+ Character.digit(s.charAt(i + 1), 16));
|
||||
}
|
||||
String result = new String(Base64Coder.encode(data));
|
||||
@@ -114,8 +111,8 @@ public class AndroidLauncher extends AndroidApplication{
|
||||
}
|
||||
|
||||
config.hideStatusBar = true;
|
||||
Net.setClientProvider(new KryoClient());
|
||||
Net.setServerProvider(new KryoServer());
|
||||
Net.setClientProvider(new ArcNetClient());
|
||||
Net.setServerProvider(new ArcNetServer());
|
||||
initialize(new Mindustry(), config);
|
||||
checkFiles(getIntent());
|
||||
}
|
||||
@@ -184,7 +181,7 @@ public class AndroidLauncher extends AndroidApplication{
|
||||
}
|
||||
|
||||
private boolean isTablet(Context context){
|
||||
TelephonyManager manager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
|
||||
TelephonyManager manager = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
|
||||
return manager != null && manager.getPhoneType() == TelephonyManager.PHONE_TYPE_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
apply plugin: "java"
|
||||
|
||||
sourceCompatibility = 1.8
|
||||
sourceSets.main.java.srcDirs = [ "src/main/java/" ]
|
||||
sourceSets.main.resources.srcDirs = [ "src/main/resources/" ]
|
||||
sourceSets.main.java.srcDirs = ["src/main/java/"]
|
||||
sourceSets.main.resources.srcDirs = ["src/main/resources/"]
|
||||
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
package io.anuke.annotations;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
import java.lang.annotation.*;
|
||||
|
||||
public class Annotations{
|
||||
|
||||
@@ -19,25 +16,25 @@ public class Annotations{
|
||||
|
||||
}
|
||||
|
||||
/** Marks a class as serializable.*/
|
||||
/** Marks a class as serializable. */
|
||||
@Target(ElementType.TYPE)
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
public @interface Serialize{
|
||||
|
||||
}
|
||||
|
||||
/** Marks a class as a special value type struct. Class name must end in 'Struct'.*/
|
||||
/** Marks a class as a special value type struct. Class name must end in 'Struct'. */
|
||||
@Target(ElementType.TYPE)
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
public @interface Struct{
|
||||
|
||||
}
|
||||
|
||||
/**Marks a field of a struct. Optional.*/
|
||||
/** Marks a field of a struct. Optional. */
|
||||
@Target(ElementType.FIELD)
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
public @interface StructField{
|
||||
/**Size of a struct field in bits. Not valid on booleans or floating point numbers.*/
|
||||
/** Size of a struct field in bits. Not valid on booleans or floating point numbers. */
|
||||
int value();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package io.anuke.annotations;
|
||||
|
||||
import io.anuke.annotations.MethodEntry;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/** Represents a class witha list method entries to include in it. */
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package io.anuke.annotations;
|
||||
|
||||
import io.anuke.annotations.Annotations.Loc;
|
||||
import io.anuke.annotations.Annotations.PacketPriority;
|
||||
import io.anuke.annotations.Annotations.Variant;
|
||||
import io.anuke.annotations.Annotations.*;
|
||||
|
||||
import javax.lang.model.element.ExecutableElement;
|
||||
|
||||
|
||||
@@ -1,18 +1,13 @@
|
||||
package io.anuke.annotations;
|
||||
|
||||
import com.squareup.javapoet.FieldSpec;
|
||||
import com.squareup.javapoet.JavaFile;
|
||||
import com.squareup.javapoet.TypeSpec;
|
||||
import com.squareup.javapoet.*;
|
||||
import io.anuke.annotations.Annotations.Loc;
|
||||
import io.anuke.annotations.Annotations.Remote;
|
||||
import io.anuke.annotations.IOFinder.ClassSerializer;
|
||||
|
||||
import javax.annotation.processing.*;
|
||||
import javax.lang.model.SourceVersion;
|
||||
import javax.lang.model.element.Element;
|
||||
import javax.lang.model.element.ExecutableElement;
|
||||
import javax.lang.model.element.Modifier;
|
||||
import javax.lang.model.element.TypeElement;
|
||||
import javax.lang.model.element.*;
|
||||
import javax.tools.Diagnostic.Kind;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -21,14 +16,14 @@ import java.util.stream.Collectors;
|
||||
/** The annotation processor for generating remote method call code. */
|
||||
@SupportedSourceVersion(SourceVersion.RELEASE_8)
|
||||
@SupportedAnnotationTypes({
|
||||
"io.anuke.annotations.Annotations.Remote",
|
||||
"io.anuke.annotations.Annotations.WriteClass",
|
||||
"io.anuke.annotations.Annotations.ReadClass",
|
||||
"io.anuke.annotations.Annotations.Remote",
|
||||
"io.anuke.annotations.Annotations.WriteClass",
|
||||
"io.anuke.annotations.Annotations.ReadClass",
|
||||
})
|
||||
public class RemoteMethodAnnotationProcessor extends AbstractProcessor{
|
||||
/** Maximum size of each event packet. */
|
||||
public static final int maxPacketSize = 4096;
|
||||
/** Warning on top of each autogenerated file.*/
|
||||
/** Warning on top of each autogenerated file. */
|
||||
public static final String autogenWarning = "Autogenerated file. Do not modify!\n";
|
||||
/** Name of the base package to put all the generated classes. */
|
||||
private static final String packageName = "io.anuke.mindustry.gen";
|
||||
@@ -37,7 +32,7 @@ public class RemoteMethodAnnotationProcessor extends AbstractProcessor{
|
||||
private static final String readServerName = "RemoteReadServer";
|
||||
/** Name of class that handles reading and invoking packets on the client. */
|
||||
private static final String readClientName = "RemoteReadClient";
|
||||
/**Simple class name of generated class name.*/
|
||||
/** Simple class name of generated class name. */
|
||||
private static final String callLocation = "Call";
|
||||
|
||||
/** Processing round number. */
|
||||
@@ -115,7 +110,7 @@ public class RemoteMethodAnnotationProcessor extends AbstractProcessor{
|
||||
|
||||
//create and add entry
|
||||
MethodEntry method = new MethodEntry(entry.name, Utils.getMethodName(element), annotation.targets(), annotation.variants(),
|
||||
annotation.called(), annotation.unreliable(), annotation.forward(), lastMethodID++, (ExecutableElement) element, annotation.priority());
|
||||
annotation.called(), annotation.unreliable(), annotation.forward(), lastMethodID++, (ExecutableElement)element, annotation.priority());
|
||||
|
||||
entry.methods.add(method);
|
||||
methods.add(method);
|
||||
@@ -140,7 +135,7 @@ public class RemoteMethodAnnotationProcessor extends AbstractProcessor{
|
||||
TypeSpec.Builder hashBuilder = TypeSpec.classBuilder("MethodHash").addModifiers(Modifier.PUBLIC);
|
||||
hashBuilder.addJavadoc(autogenWarning);
|
||||
hashBuilder.addField(FieldSpec.builder(int.class, "HASH", Modifier.STATIC, Modifier.PUBLIC, Modifier.FINAL)
|
||||
.initializer("$1L", Objects.hash(methods)).build());
|
||||
.initializer("$1L", Objects.hash(methods)).build());
|
||||
|
||||
//build and write resulting hash class
|
||||
TypeSpec spec = hashBuilder.build();
|
||||
|
||||
@@ -3,9 +3,7 @@ package io.anuke.annotations;
|
||||
import com.squareup.javapoet.*;
|
||||
import io.anuke.annotations.IOFinder.ClassSerializer;
|
||||
|
||||
import javax.lang.model.element.Modifier;
|
||||
import javax.lang.model.element.TypeElement;
|
||||
import javax.lang.model.element.VariableElement;
|
||||
import javax.lang.model.element.*;
|
||||
import javax.tools.Diagnostic.Kind;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Constructor;
|
||||
@@ -25,24 +23,23 @@ public class RemoteReadGenerator{
|
||||
|
||||
/**
|
||||
* Generates a class for reading remote invoke packets.
|
||||
*
|
||||
* @param entries List of methods to use.
|
||||
* @param className Simple target class name.
|
||||
* @param packageName Full target package name.
|
||||
* @param needsPlayer Whether this read method requires a reference to the player sender.
|
||||
*/
|
||||
public void generateFor(List<MethodEntry> entries, String className, String packageName, boolean needsPlayer)
|
||||
throws IllegalAccessException, InvocationTargetException, InstantiationException, NoSuchMethodException, IOException{
|
||||
throws IllegalAccessException, InvocationTargetException, InstantiationException, NoSuchMethodException, IOException{
|
||||
|
||||
TypeSpec.Builder classBuilder = TypeSpec.classBuilder(className).addModifiers(Modifier.PUBLIC);
|
||||
classBuilder.addJavadoc(RemoteMethodAnnotationProcessor.autogenWarning);
|
||||
|
||||
//create main method builder
|
||||
MethodSpec.Builder readMethod = MethodSpec.methodBuilder("readPacket")
|
||||
.addModifiers(Modifier.PUBLIC, Modifier.STATIC)
|
||||
.addParameter(ByteBuffer.class, "buffer") //buffer to read form
|
||||
.addParameter(int.class, "id") //ID of method type to read
|
||||
.returns(void.class);
|
||||
.addModifiers(Modifier.PUBLIC, Modifier.STATIC)
|
||||
.addParameter(ByteBuffer.class, "buffer") //buffer to read form
|
||||
.addParameter(int.class, "id") //ID of method type to read
|
||||
.returns(void.class);
|
||||
|
||||
if(needsPlayer){
|
||||
//since the player type isn't loaded yet, creating a type def is necessary
|
||||
@@ -115,13 +112,13 @@ public class RemoteReadGenerator{
|
||||
|
||||
//execute the relevant method before the forward
|
||||
//if it throws a ValidateException, the method won't be forwarded
|
||||
readBlock.addStatement("$N." + entry.element.getSimpleName() + "(" + varResult.toString() + ")", ((TypeElement) entry.element.getEnclosingElement()).getQualifiedName().toString());
|
||||
readBlock.addStatement("$N." + entry.element.getSimpleName() + "(" + varResult.toString() + ")", ((TypeElement)entry.element.getEnclosingElement()).getQualifiedName().toString());
|
||||
|
||||
//call forwarded method, don't forward on the client reader
|
||||
if(entry.forward && entry.where.isServer && needsPlayer){
|
||||
//call forwarded method
|
||||
readBlock.addStatement(packageName + "." + entry.className + "." + entry.element.getSimpleName() +
|
||||
"__forward(player.con.id" + (varResult.length() == 0 ? "" : ", ") + varResult.toString() + ")");
|
||||
"__forward(player.con.id" + (varResult.length() == 0 ? "" : ", ") + varResult.toString() + ")");
|
||||
}
|
||||
|
||||
readBlock.nextControlFlow("catch (java.lang.Exception e)");
|
||||
|
||||
@@ -4,10 +4,7 @@ import com.squareup.javapoet.*;
|
||||
import io.anuke.annotations.Annotations.Loc;
|
||||
import io.anuke.annotations.IOFinder.ClassSerializer;
|
||||
|
||||
import javax.lang.model.element.ExecutableElement;
|
||||
import javax.lang.model.element.Modifier;
|
||||
import javax.lang.model.element.TypeElement;
|
||||
import javax.lang.model.element.VariableElement;
|
||||
import javax.lang.model.element.*;
|
||||
import javax.tools.Diagnostic.Kind;
|
||||
import java.io.IOException;
|
||||
import java.nio.ByteBuffer;
|
||||
@@ -33,7 +30,7 @@ public class RemoteWriteGenerator{
|
||||
|
||||
//add temporary write buffer
|
||||
classBuilder.addField(FieldSpec.builder(ByteBuffer.class, "TEMP_BUFFER", Modifier.STATIC, Modifier.PRIVATE, Modifier.FINAL)
|
||||
.initializer("ByteBuffer.allocate($1L)", RemoteMethodAnnotationProcessor.maxPacketSize).build());
|
||||
.initializer("ByteBuffer.allocate($1L)", RemoteMethodAnnotationProcessor.maxPacketSize).build());
|
||||
|
||||
//go through each method entry in this class
|
||||
for(MethodEntry methodEntry : entry.methods){
|
||||
@@ -65,8 +62,8 @@ public class RemoteWriteGenerator{
|
||||
|
||||
//create builder
|
||||
MethodSpec.Builder method = MethodSpec.methodBuilder(elem.getSimpleName().toString() + (forwarded ? "__forward" : "")) //add except suffix when forwarding
|
||||
.addModifiers(Modifier.STATIC, Modifier.SYNCHRONIZED)
|
||||
.returns(void.class);
|
||||
.addModifiers(Modifier.STATIC, Modifier.SYNCHRONIZED)
|
||||
.returns(void.class);
|
||||
|
||||
//forwarded methods aren't intended for use, and are not public
|
||||
if(!forwarded){
|
||||
@@ -119,7 +116,7 @@ public class RemoteWriteGenerator{
|
||||
|
||||
//add the statement to call it
|
||||
method.addStatement("$N." + elem.getSimpleName() + "(" + results.toString() + ")",
|
||||
((TypeElement) elem.getEnclosingElement()).getQualifiedName().toString());
|
||||
((TypeElement)elem.getEnclosingElement()).getQualifiedName().toString());
|
||||
|
||||
if(methodEntry.local != Loc.both){
|
||||
method.endControlFlow();
|
||||
@@ -170,7 +167,7 @@ public class RemoteWriteGenerator{
|
||||
method.addStatement("TEMP_BUFFER.put(" + varName + " ? (byte)1 : 0)");
|
||||
}else{
|
||||
method.addStatement("TEMP_BUFFER.put" +
|
||||
capName + "(" + varName + ")");
|
||||
capName + "(" + varName + ")");
|
||||
}
|
||||
}else{
|
||||
//else, try and find a serializer
|
||||
@@ -209,7 +206,7 @@ public class RemoteWriteGenerator{
|
||||
|
||||
//send the actual packet
|
||||
method.addStatement("io.anuke.mindustry.net.Net." + sendString + "packet, " +
|
||||
(methodEntry.unreliable ? "io.anuke.mindustry.net.Net.SendMode.udp" : "io.anuke.mindustry.net.Net.SendMode.tcp") + ")");
|
||||
(methodEntry.unreliable ? "io.anuke.mindustry.net.Net.SendMode.udp" : "io.anuke.mindustry.net.Net.SendMode.tcp") + ")");
|
||||
|
||||
|
||||
//end check for server/client
|
||||
@@ -221,7 +218,7 @@ public class RemoteWriteGenerator{
|
||||
|
||||
private String getCheckString(Loc loc){
|
||||
return loc.isClient && loc.isServer ? "io.anuke.mindustry.net.Net.server() || io.anuke.mindustry.net.Net.client()" :
|
||||
loc.isClient ? "io.anuke.mindustry.net.Net.client()" :
|
||||
loc.isServer ? "io.anuke.mindustry.net.Net.server()" : "false";
|
||||
loc.isClient ? "io.anuke.mindustry.net.Net.client()" :
|
||||
loc.isServer ? "io.anuke.mindustry.net.Net.server()" : "false";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,13 +5,9 @@ import io.anuke.annotations.Annotations.Serialize;
|
||||
|
||||
import javax.annotation.processing.*;
|
||||
import javax.lang.model.SourceVersion;
|
||||
import javax.lang.model.element.Modifier;
|
||||
import javax.lang.model.element.TypeElement;
|
||||
import javax.lang.model.element.VariableElement;
|
||||
import javax.lang.model.element.*;
|
||||
import javax.lang.model.util.ElementFilter;
|
||||
import java.io.DataInput;
|
||||
import java.io.DataOutput;
|
||||
import java.io.IOException;
|
||||
import java.io.*;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
@@ -21,7 +17,7 @@ import java.util.Set;
|
||||
"io.anuke.annotations.Annotations.Serialize"
|
||||
})
|
||||
public class SerializeAnnotationProcessor extends AbstractProcessor{
|
||||
/**Target class name.*/
|
||||
/** Target class name. */
|
||||
private static final String className = "Serialization";
|
||||
/** Name of the base package to put all the generated classes. */
|
||||
private static final String packageName = "io.anuke.mindustry.gen";
|
||||
@@ -58,8 +54,8 @@ public class SerializeAnnotationProcessor extends AbstractProcessor{
|
||||
classBuilder.addField(jsonType, "bjson", Modifier.STATIC, Modifier.PRIVATE);
|
||||
classBuilder.addField(ubJsonReaderType, "bjsonReader", Modifier.STATIC, Modifier.PRIVATE);
|
||||
classBuilder.addStaticBlock(CodeBlock.builder()
|
||||
.addStatement("bjson = new " + jsonType + "()")
|
||||
.addStatement("bjsonReader = new " + ubJsonReaderType + "()")
|
||||
.addStatement("bjson = new " + jsonType + "()")
|
||||
.addStatement("bjsonReader = new " + ubJsonReaderType + "()")
|
||||
.build());
|
||||
|
||||
for(TypeElement elem : elements){
|
||||
@@ -99,7 +95,8 @@ public class SerializeAnnotationProcessor extends AbstractProcessor{
|
||||
|
||||
List<VariableElement> fields = ElementFilter.fieldsIn(Utils.elementUtils.getAllMembers(elem));
|
||||
for(VariableElement field : fields){
|
||||
if(field.getModifiers().contains(Modifier.STATIC) || field.getModifiers().contains(Modifier.TRANSIENT) || field.getModifiers().contains(Modifier.PRIVATE)) continue;
|
||||
if(field.getModifiers().contains(Modifier.STATIC) || field.getModifiers().contains(Modifier.TRANSIENT) || field.getModifiers().contains(Modifier.PRIVATE))
|
||||
continue;
|
||||
|
||||
String name = field.getSimpleName().toString();
|
||||
String typeName = Utils.typeUtils.erasure(field.asType()).toString().replace('$', '.');
|
||||
@@ -109,11 +106,11 @@ public class SerializeAnnotationProcessor extends AbstractProcessor{
|
||||
writeMethod.addStatement("stream.write" + capName + "(object." + name + ")");
|
||||
readMethod.addStatement("object." + name + "= stream.read" + capName + "()");
|
||||
|
||||
jsonWriteMethod.addStatement("json.writeValue(\"" + name + "\", object." + name +")");
|
||||
jsonWriteMethod.addStatement("json.writeValue(\"" + name + "\", object." + name + ")");
|
||||
jsonReadMethod.addStatement("if(value.has(\"" + name + "\")) object." + name + "= value.get" + capName + "(\"" + name + "\")");
|
||||
}else{
|
||||
writeMethod.addStatement("io.anuke.arc.Core.settings.getSerializer(" + typeName+ ".class).write(stream, object." + name + ")");
|
||||
readMethod.addStatement("object." + name + " = (" +typeName+")io.anuke.arc.Core.settings.getSerializer(" + typeName+ ".class).read(stream)");
|
||||
writeMethod.addStatement("io.anuke.arc.Core.settings.getSerializer(" + typeName + ".class).write(stream, object." + name + ")");
|
||||
readMethod.addStatement("object." + name + " = (" + typeName + ")io.anuke.arc.Core.settings.getSerializer(" + typeName + ".class).read(stream)");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,7 +120,7 @@ public class SerializeAnnotationProcessor extends AbstractProcessor{
|
||||
serializer.addMethod(writeMethod.build());
|
||||
serializer.addMethod(readMethod.build());
|
||||
|
||||
method.addStatement("io.anuke.arc.Core.settings.setSerializer($N, $L)", Utils.elementUtils.getBinaryName(elem).toString().replace('$', '.') + ".class", serializer.build());
|
||||
method.addStatement("io.anuke.arc.Core.settings.setSerializer($N, $L)", Utils.elementUtils.getBinaryName(elem).toString().replace('$', '.') + ".class", serializer.build());
|
||||
|
||||
name(writeMethod, "write" + simpleTypeName);
|
||||
name(readMethod, "read" + simpleTypeName);
|
||||
|
||||
@@ -1,28 +1,25 @@
|
||||
package io.anuke.annotations;
|
||||
|
||||
import com.squareup.javapoet.JavaFile;
|
||||
import com.squareup.javapoet.MethodSpec;
|
||||
import com.squareup.javapoet.TypeName;
|
||||
import com.squareup.javapoet.TypeSpec;
|
||||
import com.squareup.javapoet.*;
|
||||
import io.anuke.annotations.Annotations.Struct;
|
||||
import io.anuke.annotations.Annotations.StructField;
|
||||
|
||||
import javax.annotation.processing.*;
|
||||
import javax.lang.model.SourceVersion;
|
||||
import javax.lang.model.element.Modifier;
|
||||
import javax.lang.model.element.TypeElement;
|
||||
import javax.lang.model.element.VariableElement;
|
||||
import javax.lang.model.element.*;
|
||||
import javax.lang.model.type.TypeKind;
|
||||
import javax.lang.model.util.ElementFilter;
|
||||
import javax.tools.Diagnostic.Kind;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**Generates ""value types"" classes that are packed into integer primitives of the most aproppriate size.
|
||||
* It would be nice if Java didn't make crazy hacks like this necessary.*/
|
||||
/**
|
||||
* Generates ""value types"" classes that are packed into integer primitives of the most aproppriate size.
|
||||
* It would be nice if Java didn't make crazy hacks like this necessary.
|
||||
*/
|
||||
@SupportedSourceVersion(SourceVersion.RELEASE_8)
|
||||
@SupportedAnnotationTypes({
|
||||
"io.anuke.annotations.Annotations.Struct"
|
||||
"io.anuke.annotations.Annotations.Struct"
|
||||
})
|
||||
public class StructAnnotationProcessor extends AbstractProcessor{
|
||||
/** Name of the base package to put all the generated classes. */
|
||||
@@ -57,7 +54,7 @@ public class StructAnnotationProcessor extends AbstractProcessor{
|
||||
String structParam = structName.toLowerCase();
|
||||
|
||||
TypeSpec.Builder classBuilder = TypeSpec.classBuilder(structName)
|
||||
.addModifiers(Modifier.FINAL, Modifier.PUBLIC);
|
||||
.addModifiers(Modifier.FINAL, Modifier.PUBLIC);
|
||||
|
||||
try{
|
||||
List<VariableElement> variables = ElementFilter.fieldsIn(elem.getEnclosedElements());
|
||||
@@ -92,14 +89,14 @@ public class StructAnnotationProcessor extends AbstractProcessor{
|
||||
|
||||
//[get] field(structType) : fieldType
|
||||
MethodSpec.Builder getter = MethodSpec.methodBuilder(var.getSimpleName().toString())
|
||||
.addModifiers(Modifier.STATIC, Modifier.PUBLIC)
|
||||
.returns(varType)
|
||||
.addParameter(structType, structParam);
|
||||
.addModifiers(Modifier.STATIC, Modifier.PUBLIC)
|
||||
.returns(varType)
|
||||
.addParameter(structType, structParam);
|
||||
//[set] field(structType, fieldType) : structType
|
||||
MethodSpec.Builder setter = MethodSpec.methodBuilder(var.getSimpleName().toString())
|
||||
.addModifiers(Modifier.STATIC, Modifier.PUBLIC)
|
||||
.returns(structType)
|
||||
.addParameter(structType, structParam).addParameter(varType, "value");
|
||||
.addModifiers(Modifier.STATIC, Modifier.PUBLIC)
|
||||
.returns(structType)
|
||||
.addParameter(structType, structParam).addParameter(varType, "value");
|
||||
|
||||
//[getter]
|
||||
if(varType == TypeName.BOOLEAN){
|
||||
@@ -209,7 +206,7 @@ public class StructAnnotationProcessor extends AbstractProcessor{
|
||||
throw new IllegalArgumentException("Too many fields, must fit in 64 bits. Curent size: " + size);
|
||||
}
|
||||
|
||||
/**returns a type's element size in bits.*/
|
||||
/** returns a type's element size in bits. */
|
||||
static int typeSize(TypeKind kind) throws IllegalArgumentException{
|
||||
switch(kind){
|
||||
case BOOLEAN:
|
||||
|
||||
@@ -14,11 +14,11 @@ public class Utils{
|
||||
public static Messager messager;
|
||||
|
||||
public static String getMethodName(Element element){
|
||||
return ((TypeElement) element.getEnclosingElement()).getQualifiedName().toString() + "." + element.getSimpleName();
|
||||
return ((TypeElement)element.getEnclosingElement()).getQualifiedName().toString() + "." + element.getSimpleName();
|
||||
}
|
||||
|
||||
public static boolean isPrimitive(String type){
|
||||
return type.equals("boolean") || type.equals("byte") || type.equals("short") || type.equals("int")
|
||||
|| type.equals("long") || type.equals("float") || type.equals("double") || type.equals("char");
|
||||
|| type.equals("long") || type.equals("float") || type.equals("double") || type.equals("char");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ allprojects{
|
||||
gdxVersion = '1.9.9'
|
||||
roboVMVersion = '2.3.6'
|
||||
arcHash = null
|
||||
|
||||
|
||||
debugged = {
|
||||
return new File(projectDir.parent, '../debug').exists() && !project.hasProperty("release")
|
||||
}
|
||||
@@ -89,7 +89,8 @@ allprojects{
|
||||
|
||||
try{
|
||||
pfile.createNewFile()
|
||||
}catch(Exception ignored){}
|
||||
}catch(Exception ignored){
|
||||
}
|
||||
|
||||
if(pfile.exists()){
|
||||
props.load(new FileInputStream(pfile))
|
||||
@@ -112,6 +113,7 @@ allprojects{
|
||||
maven{ url "https://oss.sonatype.org/content/repositories/snapshots/" }
|
||||
maven{ url "https://oss.sonatype.org/content/repositories/releases/" }
|
||||
maven{ url 'https://jitpack.io' }
|
||||
jcenter()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,14 +123,14 @@ project(":desktop"){
|
||||
dependencies{
|
||||
compile project(":core")
|
||||
compile project(":net")
|
||||
|
||||
|
||||
if(debugged()) compile project(":debug")
|
||||
|
||||
compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
|
||||
compile "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-desktop"
|
||||
|
||||
compile arcModule("backends:backend-lwjgl3")
|
||||
compile 'com.github.MinnDevelopment:java-discord-rpc:v2.0.0'
|
||||
compile 'com.github.MinnDevelopment:java-discord-rpc:v2.0.2'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -157,9 +159,9 @@ project(":ios"){
|
||||
compile project(":core")
|
||||
compile project(":net")
|
||||
compileOnly project(":annotations")
|
||||
|
||||
|
||||
compile arcModule("backends:backend-robovm")
|
||||
|
||||
|
||||
compile "com.mobidevelop.robovm:robovm-rt:$roboVMVersion"
|
||||
compile "com.mobidevelop.robovm:robovm-cocoatouch:$roboVMVersion"
|
||||
compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios"
|
||||
@@ -174,32 +176,10 @@ project(":core"){
|
||||
generateLocales()
|
||||
}
|
||||
|
||||
task cleanGen{
|
||||
doFirst{
|
||||
delete{
|
||||
delete "../core/src/io/anuke/mindustry/gen/"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task copyGen{
|
||||
doLast{
|
||||
copy{
|
||||
from("../core/build/classes/java/main/io/anuke/mindustry/gen/"){
|
||||
include "**/*.java"
|
||||
}
|
||||
|
||||
into "../core/src/io/anuke/mindustry/gen"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies{
|
||||
compileJava.dependsOn(cleanGen)
|
||||
compileJava.finalizedBy(copyGen)
|
||||
|
||||
compile arcModule("arc-core")
|
||||
compile arcModule("extensions:freetype")
|
||||
compile arcModule("extensions:arcnet")
|
||||
if(localArc() && debugged()) compile arcModule("extensions:recorder")
|
||||
|
||||
compileOnly project(":annotations")
|
||||
@@ -256,7 +236,6 @@ project(":net"){
|
||||
dependencies{
|
||||
compile project(":core")
|
||||
compile "org.lz4:lz4-java:1.4.1"
|
||||
compile 'com.github.Anuken:kryonet:a64d2280880e80566ca1bdaffa55de43e51cad38'
|
||||
compile 'com.github.Anuken:WaifUPnP:05eb46bc577fd7674596946ba288c96c0cedd893'
|
||||
}
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 310 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 336 B |
|
Before Width: | Height: | Size: 116 B |
|
Before Width: | Height: | Size: 120 B |
|
Before Width: | Height: | Size: 114 B |
|
Before Width: | Height: | Size: 105 B |
|
Before Width: | Height: | Size: 115 B |
|
Before Width: | Height: | Size: 121 B |
@@ -1,8 +1,8 @@
|
||||
{
|
||||
duplicatePadding: true,
|
||||
combineSubdirectories: true,
|
||||
flattenPaths: true,
|
||||
maxWidth: 2048,
|
||||
maxHeight: 2048,
|
||||
fast: true,
|
||||
duplicatePadding: true,
|
||||
combineSubdirectories: true,
|
||||
flattenPaths: true,
|
||||
maxWidth: 2048,
|
||||
maxHeight: 2048,
|
||||
fast: true
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
duplicatePadding: true,
|
||||
combineSubdirectories: true,
|
||||
flattenPaths: true,
|
||||
maxWidth: 1024,
|
||||
maxHeight: 1024,
|
||||
fast: true,
|
||||
duplicatePadding: true,
|
||||
combineSubdirectories: true,
|
||||
flattenPaths: true,
|
||||
maxWidth: 1024,
|
||||
maxHeight: 1024,
|
||||
fast: true
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 680 B |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 201 B After Width: | Height: | Size: 201 B |
|
After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 125 B |
@@ -1,8 +1,8 @@
|
||||
{
|
||||
duplicatePadding: true,
|
||||
combineSubdirectories: true,
|
||||
flattenPaths: true,
|
||||
maxWidth: 2048,
|
||||
maxHeight: 2048,
|
||||
fast: true,
|
||||
duplicatePadding: true,
|
||||
combineSubdirectories: true,
|
||||
flattenPaths: true,
|
||||
maxWidth: 2048,
|
||||
maxHeight: 2048,
|
||||
fast: true
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
duplicatePadding: true,
|
||||
combineSubdirectories: true,
|
||||
flattenPaths: true,
|
||||
maxWidth: 1024,
|
||||
maxHeight: 1024,
|
||||
fast: true,
|
||||
duplicatePadding: true,
|
||||
combineSubdirectories: true,
|
||||
flattenPaths: true,
|
||||
maxWidth: 1024,
|
||||
maxHeight: 1024,
|
||||
fast: true
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 1.9 KiB |