Closed AbeJellinek closed 10 years ago
Please show your build.gradle.
Here it is:
apply plugin: 'java'
apply plugin: 'robovm'
sourceCompatibility = '1.7'
configurations { natives }
buildscript {
repositories {
mavenCentral()
mavenLocal()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
dependencies {
classpath 'com.github.jtakakura:gradle-robovm-plugin:0.0.9-SNAPSHOT'
}
}
dependencies {
compile "org.robovm:robovm-rt:$roboVMVersion"
compile "org.robovm:robovm-cocoatouch:$roboVMVersion"
compile project(":gdx-main")
compile "com.badlogicgames.gdx:gdx-backend-robovm:$gdxVersion"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios"
natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-ios"
}
ext {
mainClassName = "com.futuristiclights.infinity.ios.IOSStarter"
}
// Extracts native libs (*.a) from the native-ios.jar and places them
// under build/libs/ios/.
task copyNatives << {
file("build/libs/ios/").mkdirs();
configurations.natives.files.each { jar ->
def outputDir = null
if (jar.name.endsWith("natives-ios.jar")) outputDir = file("build/libs/ios")
if (outputDir != null) {
copy {
from zipTree(jar)
into outputDir
include "*.a"
}
}
}
}
// Updates a robovm.xml file.
task updateRoboVMXML << {
def xml = file('robovm.xml')
if (!xml.exists()) {
return
}
// Find all native (*.a) libraries beneath libs
def libtree = fileTree(dir: 'build/libs', include: '**/*.a')
def config = new groovy.util.XmlParser().parse(xml)
config.libs.each { libs ->
libs.children().clear()
libtree.each { File file ->
libs.appendNode('lib', 'build/libs/ios/' + file.getName())
}
// libs.appendNode('lib', 'libs/ios/libInfinityIOS.a')
}
def writer = new FileWriter(xml)
def printer = new XmlNodePrinter(new PrintWriter(writer))
printer.setPreserveWhitespace true
printer.print(config)
}
robovm {
iosSkipSigning = true
}
updateRoboVMXML.dependsOn copyNatives
build.dependsOn updateRoboVMXML
launchIPhoneSimulator.dependsOn build
launchIPadSimulator.dependsOn build
launchIOSDevice.dependsOn build
createIPA.dependsOn build
roboVMVersion is defined in my main build file:
buildscript {
repositories {
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
dependencies {
classpath 'com.android.tools.build:gradle:0.10.+'
}
}
allprojects {
repositories {
mavenCentral()
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots/'
}
}
ext {
gdxVersion = "1.0.2-SNAPSHOT"
roboVMVersion = "0.0.13-SNAPSHOT"
}
apply plugin: 'idea'
}
I Fixed it. Please try again.
Thank you! Even quicker than I expected.
The example build script in the readme says to use the snapshot version of the plugin along with the RoboVM snapshot, but I get this error when I try to compile a project using the snapshot:
It seems to be only looking in Maven Central and not Sonatype Snapshots.