Fixed Eclipse generating pointless warnings about facets

This commit is contained in:
Anuken
2017-08-09 14:59:31 -04:00
parent 09985e30fe
commit cd4014f86a
8 changed files with 23 additions and 22 deletions

View File

@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.anuke.mindustry" package="io.anuke.mindustry"
android:versionCode="4" android:versionCode="5"
android:versionName="1.1" > android:versionName="1.1.1" >
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="25" /> <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="25" />

View File

@@ -8,7 +8,7 @@ android {
aidl.srcDirs = ['src'] aidl.srcDirs = ['src']
renderscript.srcDirs = ['src'] renderscript.srcDirs = ['src']
res.srcDirs = ['res'] res.srcDirs = ['res']
assets.srcDirs = ['assets'] assets.srcDirs = ['assets', 'src/main/assets', '../core/assets/']
jniLibs.srcDirs = ['libs'] jniLibs.srcDirs = ['libs']
} }
@@ -131,5 +131,7 @@ idea {
} }
} }
} }
dependencies { dependencies {
//compile files('lib/ucore.jar')
} }

View File

@@ -2,6 +2,7 @@ package io.anuke.mindustry;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
import java.util.Locale;
import com.badlogic.gdx.backends.android.AndroidApplication; import com.badlogic.gdx.backends.android.AndroidApplication;
import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration; import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration;
@@ -18,7 +19,7 @@ public class AndroidLauncher extends AndroidApplication {
config.useImmersiveMode = true; config.useImmersiveMode = true;
SaveIO.setFormatProvider(new FormatProvider(){ SaveIO.setFormatProvider(new FormatProvider(){
SimpleDateFormat format = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss"); SimpleDateFormat format = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss", Locale.ENGLISH);
public String format(Date date){ public String format(Date date){
return format.format(date); return format.format(date);

View File

@@ -50,6 +50,7 @@ project(":html") {
dependencies { dependencies {
compile project(":core") compile project(":core")
compile fileTree(dir: '../core/lib', include: '*.jar')
compile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion" compile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion"
compile "com.badlogicgames.gdx:gdx:$gdxVersion:sources" compile "com.badlogicgames.gdx:gdx:$gdxVersion:sources"
compile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion:sources" compile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion:sources"
@@ -78,7 +79,8 @@ project(":core") {
apply plugin: "java" apply plugin: "java"
dependencies { dependencies {
compile fileTree(dir: '../core/lib', include: '*.jar') //compile fileTree(dir: '../core/lib', include: '*.jar')
compile 'com.github.anuken:ucore:b8222ac95e'
compile "com.badlogicgames.gdx:gdx:$gdxVersion" compile "com.badlogicgames.gdx:gdx:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-ai:1.8.1" compile "com.badlogicgames.gdx:gdx-ai:1.8.1"
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -6,6 +6,7 @@ import static io.anuke.ucore.scene.actions.Actions.*;
import com.badlogic.gdx.Application.ApplicationType; import com.badlogic.gdx.Application.ApplicationType;
import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.Batch; import com.badlogic.gdx.graphics.g2d.Batch;
import com.badlogic.gdx.math.Interpolation; import com.badlogic.gdx.math.Interpolation;
import com.badlogic.gdx.utils.Align; import com.badlogic.gdx.utils.Align;
@@ -62,7 +63,7 @@ public class UI extends SceneModule{
Dialog.closePadT = 4; Dialog.closePadT = 4;
Textures.load("sprites/"); Textures.load("sprites/");
Textures.repeatWrap("conveyort", "back"); Textures.repeatWrap("conveyort", Gdx.app.getType() == ApplicationType.WebGL ? "back-web" : "back");
} }
void drawBackground(){ void drawBackground(){
@@ -78,7 +79,10 @@ public class UI extends SceneModule{
float scale = Unit.dp.inPixels(1f); float scale = Unit.dp.inPixels(1f);
batch.draw(Textures.get("back"), 0, 0, w, h, 0, 0, (float)w/h/scale * h/Textures.get("back").getHeight()/4f, -1f/scale * h/Textures.get("back").getHeight()/4f); Texture texture = Textures.get(Gdx.app.getType() == ApplicationType.WebGL ? "back-web" : "back");
batch.draw(texture,
0, 0, w, h, 0, 0, (float)w/h/scale * h/texture.getHeight()/4f, -1f/scale * h/texture.getHeight()/4f);
for(int x = 0; x < tw; x ++){ for(int x = 0; x < tw; x ++){
float offset = (Timers.time()*2*(x%2-0.5f))/32f; float offset = (Timers.time()*2*(x%2-0.5f))/32f;

View File

@@ -18,20 +18,6 @@ gwt {
} }
} }
task draftRun(type: JettyRunWar) {
dependsOn draftWar
dependsOn.remove('war')
webApp=draftWar.archivePath
daemon=true
}
task superDev(type: de.richsource.gradle.plugins.gwt.GwtSuperDev) {
dependsOn draftRun
doFirst {
gwt.modules = gwt.devModules
}
}
task dist(dependsOn: [clean, compileGwt]) { task dist(dependsOn: [clean, compileGwt]) {
doLast { doLast {
file("build/dist").mkdirs() file("build/dist").mkdirs()
@@ -56,6 +42,13 @@ task distZip(type: Zip, dependsOn: dist){
destinationDir(file("build/dist-zipped")) destinationDir(file("build/dist-zipped"))
} }
eclipseWtpFacet.doLast{
delete{
delete '.settings/org.eclipse.wst.common.project.facet.core.xml'
}
}
draftWar { draftWar {
from "war" from "war"
} }

View File

@@ -6,7 +6,6 @@
<inherits name='Mindustry' /> <inherits name='Mindustry' />
<inherits name='uCore' /> <inherits name='uCore' />
<entry-point class='io.anuke.mindustry.client.HtmlLauncher' /> <entry-point class='io.anuke.mindustry.client.HtmlLauncher' />
<set-configuration-property name='xsiframe.failIfScriptTag' value='FALSE'/> <set-configuration-property name='xsiframe.failIfScriptTag' value='FALSE'/>
<set-configuration-property name="gdx.assetpath" value="../core/assets" /> <set-configuration-property name="gdx.assetpath" value="../core/assets" />