New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RoboVM Gradle Plugin: Execution failed for task ':android:lintVitalRelease'. > originalComplianceLevel #13

Closed
3xp0n3nt opened this Issue May 19, 2016 · 5 comments

Comments

Projects
None yet
3 participants
@3xp0n3nt

3xp0n3nt commented May 19, 2016

Issue details

Using the latest gdx-setup.jar, creating a new default LibGDX project using gdx-setup.jar, running ./gradlew clean build causes build failure with all current versions of @MobiDevelop's RoboVM Gradle plugin.

There is some sort of conflict between the RoboVM Gradle plugin & the Android Gradle plugin. If you remove either one of these two plugins from the buildscript, the build will succeed. Changing dependency and/or plugin versions did not cause any change, as you can see below.

Error message:

Execution failed for task ':android:lintVitalRelease'.
> originalComplianceLevel

Root cause:

Caused by: java.lang.NoSuchFieldError: originalComplianceLevel

Related issue: https://groups.google.com/forum/#!topic/adt-dev/2LnnpF-t6XA

Reproduction steps/code

  1. Download & run the latest gdx-setup.jar.
  2. Create a new default LibGDX project.
  3. Configure the com.mobidevelop robovm gradle plugin in the root build.gradle, as described here.
  4. Run ./gradlew clean build on the project.

root build.gradle:

buildscript {
  repositories {
    mavenLocal ()
    mavenCentral ()
    maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
  }
  dependencies {
    classpath 'com.android.tools.build:gradle:1.5.0'
    classpath 'com.mobidevelop.robovm:robovm-gradle-plugin:2.1.0'
  }
}

allprojects {
  apply plugin: "eclipse"
  apply plugin: "idea"

  version = '1.0'
  ext {
    appName = "game"
    gdxVersion = '1.9.3'
    roboVMVersion = '2.1.0'
  }

  repositories {
    mavenLocal ()
    mavenCentral ()
    maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
    maven { url "https://oss.sonatype.org/content/repositories/releases/" }
  }
}

project (":desktop") {
  apply plugin: "java"


  dependencies {
    compile project (":core")
    compile "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion"
    compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
  }
}

project (":android") {
  apply plugin: "android"

  configurations { natives }

  dependencies {
    compile project (":core")
    compile "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
    natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi"
    natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a"
    natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86"
  }
}

project (":ios") {
  apply plugin: "java"
  apply plugin: "robovm"


  dependencies {
    compile project (":core")
    compile "com.mobidevelop.robovm:robovm-rt:${roboVMVersion}"
    compile "com.mobidevelop.robovm:robovm-cocoatouch:${roboVMVersion}"
    compile "com.badlogicgames.gdx:gdx-backend-robovm:$gdxVersion"
    compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios"
  }
}

project (":core") {
  apply plugin: "java"


  dependencies {
    compile "com.badlogicgames.gdx:gdx:$gdxVersion"
  }
}

tasks.eclipse.doLast {
  delete ".project"
}

Version of LibGDX and/or relevant dependencies

OS: OS X 10.11.4 (El Capitan)
Java: 1.8.0_72
Project Language Level: 1.7
LibGDX: 1.9.3, 1.9.4-SNAPSHOT
RoboVM: 2.1.0, 2.2.0-SNAPSHOT
RoboVM Gradle Plugin: 2.1.0, 2.2.0-SNAPSHOT
Android Build Tools 23.0.1, 23.0.2
Android: 20, 23
Android Gradle Plugin: 1.5.0, 2.1.0

Stacktrace

15:37:33.226 [ERROR] [org.gradle.BuildExceptionReporter]
15:37:33.226 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
15:37:33.226 [ERROR] [org.gradle.BuildExceptionReporter]
15:37:33.226 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
15:37:33.226 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':android:lintVitalRelease'.
15:37:33.226 [ERROR] [org.gradle.BuildExceptionReporter] > originalComplianceLevel
15:37:33.226 [ERROR] [org.gradle.BuildExceptionReporter]
15:37:33.226 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is:
15:37:33.226 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':android:lintVitalRelease'.
15:37:33.226 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
15:37:33.227 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
15:37:33.227 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
15:37:33.227 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
15:37:33.227 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
15:37:33.227 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
15:37:33.227 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
15:37:33.227 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
15:37:33.227 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
15:37:33.227 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
15:37:33.227 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
15:37:33.227 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66)
15:37:33.227 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)
15:37:33.227 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:25)
15:37:33.227 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:110)
15:37:33.227 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)
15:37:33.227 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
15:37:33.227 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23)
15:37:33.227 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43)
15:37:33.227 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
15:37:33.228 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
15:37:33.228 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30)
15:37:33.228 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.initialization.DefaultGradleLauncher$4.run(DefaultGradleLauncher.java:154)
15:37:33.228 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.internal.Factories$1.create(Factories.java:22)
15:37:33.228 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
15:37:33.228 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:52)
15:37:33.228 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:151)
15:37:33.228 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:32)
15:37:33.228 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:99)
15:37:33.228 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:93)
15:37:33.228 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
15:37:33.228 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:62)
15:37:33.228 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:93)
15:37:33.228 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:82)
15:37:33.228 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:94)
15:37:33.228 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
15:37:33.228 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
15:37:33.229 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:43)
15:37:33.229 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:28)
15:37:33.229 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:78)
15:37:33.229 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:48)
15:37:33.229 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:52)
15:37:33.229 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
15:37:33.229 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
15:37:33.229 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37)
15:37:33.229 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
15:37:33.229 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)
15:37:33.229 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
15:37:33.229 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)
15:37:33.229 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
15:37:33.229 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
15:37:33.229 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
15:37:33.229 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.util.Swapper.swap(Swapper.java:38)
15:37:33.230 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
15:37:33.230 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
15:37:33.230 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.health.DaemonHealthTracker.execute(DaemonHealthTracker.java:47)
15:37:33.230 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
15:37:33.230 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:66)
15:37:33.230 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
15:37:33.230 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
15:37:33.230 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:72)
15:37:33.230 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
15:37:33.230 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
15:37:33.230 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.health.HintGCAfterBuild.execute(HintGCAfterBuild.java:41)
15:37:33.230 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
15:37:33.230 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50)
15:37:33.230 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:246)
15:37:33.230 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
15:37:33.231 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
15:37:33.231 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: java.lang.NoSuchFieldError: originalComplianceLevel
15:37:33.231 [ERROR] [org.gradle.BuildExceptionReporter]    at com.android.tools.lint.EcjParser.createCompilerOptions(EcjParser.java:171)
15:37:33.231 [ERROR] [org.gradle.BuildExceptionReporter]    at com.android.tools.lint.EcjParser.getParser(EcjParser.java:208)
15:37:33.231 [ERROR] [org.gradle.BuildExceptionReporter]    at com.android.tools.lint.EcjParser.<init>(EcjParser.java:154)
15:37:33.231 [ERROR] [org.gradle.BuildExceptionReporter]    at com.android.tools.lint.LintCliClient.getJavaParser(LintCliClient.java:207)
15:37:33.231 [ERROR] [org.gradle.BuildExceptionReporter]    at com.android.tools.lint.client.api.LintDriver$LintClientWrapper.getJavaParser(LintDriver.java:1979)
15:37:33.231 [ERROR] [org.gradle.BuildExceptionReporter]    at com.android.tools.lint.client.api.LintDriver.checkJava(LintDriver.java:1503)
15:37:33.231 [ERROR] [org.gradle.BuildExceptionReporter]    at com.android.tools.lint.client.api.LintDriver.runFileDetectors(LintDriver.java:1061)
15:37:33.231 [ERROR] [org.gradle.BuildExceptionReporter]    at com.android.tools.lint.client.api.LintDriver.checkProject(LintDriver.java:906)
15:37:33.231 [ERROR] [org.gradle.BuildExceptionReporter]    at com.android.tools.lint.client.api.LintDriver.analyze(LintDriver.java:435)
15:37:33.231 [ERROR] [org.gradle.BuildExceptionReporter]    at com.android.tools.lint.client.api.LintDriver.analyze(LintDriver.java:376)
15:37:33.232 [ERROR] [org.gradle.BuildExceptionReporter]    at com.android.tools.lint.LintCliClient.run(LintCliClient.java:128)
15:37:33.232 [ERROR] [org.gradle.BuildExceptionReporter]    at com.android.build.gradle.internal.LintGradleClient.run(LintGradleClient.java:116)
15:37:33.232 [ERROR] [org.gradle.BuildExceptionReporter]    at com.android.build.gradle.internal.LintGradleClient$run.call(Unknown Source)
15:37:33.232 [ERROR] [org.gradle.BuildExceptionReporter]    at com.android.build.gradle.tasks.Lint.runLint(Lint.groovy:196)
15:37:33.232 [ERROR] [org.gradle.BuildExceptionReporter]    at com.android.build.gradle.tasks.Lint.this$6$runLint(Lint.groovy)
15:37:33.232 [ERROR] [org.gradle.BuildExceptionReporter]    at com.android.build.gradle.tasks.Lint.lintSingleVariant(Lint.groovy:171)
15:37:33.233 [ERROR] [org.gradle.BuildExceptionReporter]    at com.android.build.gradle.tasks.Lint$lintSingleVariant$2.callCurrent(Unknown Source)
15:37:33.233 [ERROR] [org.gradle.BuildExceptionReporter]    at com.android.build.gradle.tasks.Lint.lint(Lint.groovy:73)
15:37:33.233 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
15:37:33.233 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:227)
15:37:33.233 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:220)
15:37:33.233 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:209)
15:37:33.233 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:585)
15:37:33.233 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:568)
15:37:33.233 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
15:37:33.234 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
15:37:33.234 [ERROR] [org.gradle.BuildExceptionReporter]    ... 68 more
15:37:33.234 [ERROR] [org.gradle.BuildExceptionReporter]
15:37:33.234 [LIFECYCLE] [org.gradle.BuildResultLogger]
15:37:33.234 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED

Please select the affected platforms

  • Android
  • iOS
  • HTML/GWT
  • Windows
  • Linux
  • MacOS

@3xp0n3nt 3xp0n3nt changed the title from Execution failed for task ':android:lintVitalRelease'. > originalComplianceLevel to RoboVM Gradle Plugin: Execution failed for task ':android:lintVitalRelease'. > originalComplianceLevel May 19, 2016

3xp0n3nt added a commit to forerunnergames/peril that referenced this issue May 19, 2016

Workaround for RoboVM Gradle plugin bug.
- Disable RoboVM Gradle plugin & accompanying Gradle tasks in iOS build
  configuration.

See MobiVM/robovm#13 for more
information.
@MobiDevelop

This comment has been minimized.

Member

MobiDevelop commented May 19, 2016

Though I don't know how to fix it - it would seem that the RoboVM plugin is pulling in a version of the CompileOptions (org.eclipse.jdt.internal.compiler.impl.CompilerOptions) class which doesn't have the originalComplianceLevel field that the Android lint plugin is trying to use.

@MobiDevelop

This comment has been minimized.

Member

MobiDevelop commented May 19, 2016

I found a workaround for now... I removed the robovm plugin from the root buildscript dependencies and put it in the ios/build.gradle instead.

build.gradle

buildscript {
    repositories {
        mavenLocal()
        mavenCentral()
        maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
        jcenter()
    }
    dependencies {
        classpath 'de.richsource.gradle.plugins:gwt-gradle-plugin:0.6'
        classpath 'com.android.tools.build:gradle:2.1.0'
    }
}

allprojects {
    apply plugin: "eclipse"
    apply plugin: "idea"

    version = '1.0'
    ext {
        appName = "my-gdx-game"
        gdxVersion = '1.9.3'
        roboVMVersion = '2.1.0'
        box2DLightsVersion = '1.4'
        ashleyVersion = '1.7.0'
        aiVersion = '1.8.0'
    }

    repositories {
        mavenLocal()
        mavenCentral()
        maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
        maven { url "https://oss.sonatype.org/content/repositories/releases/" }
    }
}

project(":desktop") {
    apply plugin: "java"


    dependencies {
        compile project(":core")
        compile "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion"
        compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
    }
}

project(":android") {
    apply plugin: "android"

    configurations { natives }

    dependencies {
        compile project(":core")
        compile "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-arm64-v8a"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86_64"
    }
}

project(":ios") {
    apply plugin: "java"

    dependencies {
        compile project(":core")
        compile "com.mobidevelop.robovm:robovm-rt:$roboVMVersion"
        compile "com.mobidevelop.robovm:robovm-cocoatouch:$roboVMVersion"
        compile "com.badlogicgames.gdx:gdx-backend-robovm:$gdxVersion"
        compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios"
    }
}

project(":html") {
    apply plugin: "gwt"
    apply plugin: "war"


    dependencies {
        compile project(":core")
        compile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion"
        compile "com.badlogicgames.gdx:gdx:$gdxVersion:sources"
        compile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion:sources"
    }
}

project(":core") {
    apply plugin: "java"


    dependencies {
        compile "com.badlogicgames.gdx:gdx:$gdxVersion"
    }
}

tasks.eclipse.doLast {
    delete ".project"
}

ios/build.gradle

buildscript {
    repositories {
        mavenLocal()
        mavenCentral()
        maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
        jcenter()
    }
    dependencies {
        classpath 'com.mobidevelop.robovm:robovm-gradle-plugin:2.1.0'
    }
}
apply plugin: "robovm"

sourceSets.main.java.srcDirs = [ "src/" ]

sourceCompatibility = '1.7'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'

ext {
    mainClassName = "com.mygdx.game.IOSLauncher"
}

launchIPhoneSimulator.dependsOn build
launchIPadSimulator.dependsOn build
launchIOSDevice.dependsOn build
createIPA.dependsOn build


eclipse.project {
    name = appName + "-ios"
    natures 'org.robovm.eclipse.RoboVMNature'
}
@3xp0n3nt

This comment has been minimized.

3xp0n3nt commented May 19, 2016

Thanks! I'll test it out later today.

3xp0n3nt added a commit to forerunnergames/peril that referenced this issue May 20, 2016

Improved workaround for RoboVM Gradle plugin bug.
- Remove non-functional workaround, which completely disabled the RoboVM
  Gradle plugin.

- Add functional workaround, by moving the RoboVM Gradle plugin
  functionality out of the root build.gradle and into the iOS-backend
  build.gradle.

See MobiVM/robovm#13 for more
information.
@3xp0n3nt

This comment has been minimized.

3xp0n3nt commented May 20, 2016

Workaround seems to be ok so far. I'm amazed that no one else has encountered this issue.

@Tom-Ski Tom-Ski closed this in 4b2a8f4 May 20, 2016

3xp0n3nt added a commit to forerunnergames/peril that referenced this issue May 25, 2016

Remove Gradle RoboVM plugin workaround.
- Place RoboVM Gradle plugin classpath dependency back into root
  build.gradle buildscript block.

- Remove buildscript block, RoboVM Gradle plugin
  classpath dependency, & applying of RoboVM plugin from iOS
  build.gradle.

- Apply RoboVM plugin in iOS subproject declaration in root
  build.gradle.

- Upgrade RoboVM Gradle plugin version & RoboVM version to
  2.2.0-SNAPSHOT, which fixes
  MobiVM/robovm#13
@wolpert

This comment has been minimized.

wolpert commented May 30, 2016

Just an FYI... I had to do this workaround with 1.9.3 update just now. Not even using RoboVM... but I guess when I built the project originally I had added iOS as a deployment platform. Even though I never call RoboVM, this gradle fix was needed for me to get an android build working again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment