This commit is contained in:
Armin Benz 2017-11-22 17:39:36 +01:00
parent 2b0ca12ccd
commit d1df61d8dc
7 changed files with 12 additions and 73 deletions

View File

@ -1,5 +1,5 @@
android {
buildToolsVersion '25.0.0'
buildToolsVersion '26.0.2'
compileSdkVersion 24
sourceSets {
main {
@ -63,35 +63,6 @@ task run(type: Exec) {
}
// sets up the Android Eclipse project, using the old Ant based build.
eclipse {
// need to specify Java source sets explicitely, SpringSource Gradle Eclipse plugin
// ignores any nodes added in classpath.file.withXml
sourceSets {
main {
java.srcDirs "src", 'gen'
}
}
jdt {
sourceCompatibility = 1.6
targetCompatibility = 1.6
}
classpath {
plusConfigurations += [ project.configurations.compile ]
containers 'com.android.ide.eclipse.adt.ANDROID_FRAMEWORK', 'com.android.ide.eclipse.adt.LIBRARIES'
}
project {
name = appName + "-android"
natures 'com.android.ide.eclipse.adt.AndroidNature'
buildCommands.clear();
buildCommand "com.android.ide.eclipse.adt.ResourceManagerBuilder"
buildCommand "com.android.ide.eclipse.adt.PreCompilerBuilder"
buildCommand "org.eclipse.jdt.core.javabuilder"
buildCommand "com.android.ide.eclipse.adt.ApkBuilder"
}
}
// sets up the Android Idea project, using the old Ant based build.
idea {

View File

@ -3,15 +3,15 @@ buildscript {
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'org.robovm:robovm-gradle-plugin:1.9.0'
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'org.robovm:robovm-gradle-plugin:1.12.0'
}
}
allprojects {
apply plugin: "eclipse"
apply plugin: "idea"
version = '1.0'
@ -25,6 +25,7 @@ allprojects {
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://oss.sonatype.org/content/repositories/releases/" }
google()
}
}
@ -82,8 +83,4 @@ project(":ios") {
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios"
natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-ios"
}
}
tasks.eclipse.doLast {
delete ".project"
}

View File

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

View File

@ -23,10 +23,6 @@ public class SplashScreen implements Screen {
@Override
public void render(float delta) {
Gdx.gl.glClearColor(1, 1, 1, 1); //Weiß
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);

View File

@ -2,7 +2,8 @@ apply plugin: "java"
sourceCompatibility = 1.6
sourceSets.main.java.srcDirs = ["src/"]
project.ext.mainClassName = "de.samdev.colorrunner.desktop.DesktopLauncher"
project.ext.assetsDir = new File("../android/assets");
project.ext.assetsDir = new File("../android/assets")
task run(dependsOn: classes, type: JavaExec) {
main = project.mainClassName
classpath = sourceSets.main.runtimeClasspath
@ -10,6 +11,7 @@ task run(dependsOn: classes, type: JavaExec) {
workingDir = project.assetsDir
ignoreExitValue = true
}
task dist(type: Jar) {
from files(sourceSets.main.output.classesDir)
from files(sourceSets.main.output.resourcesDir)
@ -20,20 +22,5 @@ task dist(type: Jar) {
attributes 'Main-Class': project.mainClassName
}
}
dist.dependsOn classes
eclipse {
project {
name = appName + "-desktop"
linkedResource name: 'assets', type: '2', location: 'PARENT-1-PROJECT_LOC/android/assets'
}
}
task afterEclipseImport(description: "Post processing after project generation", group: "IDE") {
doLast {
def classpath = new XmlParser().parse(file(".classpath"))
new Node(classpath, "classpathentry", [kind: 'src', path: 'assets']);
def writer = new FileWriter(file(".classpath"))
def printer = new XmlNodePrinter(new PrintWriter(writer))
printer.setPreserveWhitespace(true)
printer.print(classpath)
}
}

View File

@ -1,6 +1,6 @@
#Thu Apr 13 20:04:09 CEST 2017
#Wed Nov 22 17:23:18 CET 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip

View File

@ -51,15 +51,8 @@ task updateRoboVMXML << {
updateRoboVMXML.dependsOn copyNatives
build.dependsOn updateRoboVMXML
tasks.eclipse.dependsOn updateRoboVMXML
launchIPhoneSimulator.dependsOn build
launchIPadSimulator.dependsOn build
launchIOSDevice.dependsOn build
createIPA.dependsOn build
eclipse.project {
name = appName + "-ios"
natures 'org.robovm.eclipse.RoboVMNature'
}