Skip to content
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

Plugin not working against android plugin 1.4.x-beta #61

Closed
pjakubczyk opened this issue Sep 16, 2015 · 16 comments
Closed

Plugin not working against android plugin 1.4.x-beta #61

pjakubczyk opened this issue Sep 16, 2015 · 16 comments

Comments

@pjakubczyk
Copy link

Google released 1.4.0-beta2 (2015/09/15)
http://tools.android.com/tech-docs/new-build-system

and it's crashing while looking for
https://github.com/groovy/groovy-android-gradle-plugin/blob/master/src/main/groovy/groovyx/grooid/GroovyAndroidPlugin.groovy#L19

Stacktrace

Caused by: groovy.lang.MissingPropertyException: No such property: bootClasspath for class: com.android.builder.core.AndroidBuilder
    at groovyx.grooid.GroovyAndroidPlugin$__clinit__closure10.doCall(GroovyAndroidPlugin.groovy:19)
    at groovyx.grooid.GroovyAndroidPlugin.getRuntimeJars(GroovyAndroidPlugin.groovy:154)
    at groovyx.grooid.GroovyAndroidPlugin$getRuntimeJars$1.call(Unknown Source)
    at groovyx.grooid.GroovyAndroidPlugin$_attachGroovyCompileTask_closure5_closure19.doCall(GroovyAndroidPlugin.groovy:102)
    at org.gradle.api.internal.AbstractTask$ClosureTaskAction.execute(AbstractTask.java:554)
    at org.gradle.api.internal.AbstractTask$ClosureTaskAction.execute(AbstractTask.java:535)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
@dmancilla
Copy link
Contributor

I checked the structure of the com.android.builder.core.AndroidBuilder object in runtime , and there's a different signature in the getBootClassPath method between the 1.4.0-beta1 and the 1.4.0-beta2 version:

  • 1.4.0-beta1:
    public List getBootClasspath();
  • 1.4.0-beta2:
    public List getBootClasspath(boolean);

So, by adding a parameter to the method getBootClasspath, it can no longer be called as a property.

I tested the values returned with both boolean values:

Return value from getBootClasspath(true):
['C:\android-sdk\platforms\android-23\android.jar', C:\android-sdk\platforms\android-23\optional\org.apache.http.legacy.jar']

Return value from getBootClasspath(false):
['C:\android-sdk\platforms\android-23\android.jar']

I can guess the parameter means "include legacy bootClasspath" or something similar

I created a pull request (#62) to add the code to support 1.4.0-beta2. I tested in a simple application, that had the same error as reported (Caused by: groovy.lang.MissingPropertyException: No such property: bootClasspath for class: com.android.builder.core.AndroidBuilder
), and now it compiles without problems

I couldn't find a way to download the exact 1.4.0-beta1 and 1.4.0-beta2 source code, don't know if it's available from Google, not sure if this is the actual source code

@pjakubczyk
Copy link
Author

I can't find it too. Anyways thanks for the update. I will retest the plugin once they release to 1.4.0 - no beta :)

@dbacinski
Copy link

Problem still occurs in final version v1.5.0, it is time to release plugin

@RoundSparrow
Copy link

I seem to be having the same problem with v1.5.0 - is a release coming soon?

@mradzinski
Copy link

On the 1.5.0 version of the plugin the method getBootClassPath has the same signature @dmancilla mentioned.

@dbacinski
Copy link

Until release SNAPSHOT version can be used provided by Jitpack:
https://jitpack.io/#groovy/groovy-android-gradle-plugin/1b77dd6763

It works perfectly with 1.5.0 version of the plugin.

@ThanosFisherman
Copy link

Looks like I'm having the same issue on stable plugin 1.5.0 but I suspect it is related to dexguard (Or maybe not). Project builds fine but it can't execute.

Here's the stacktrace

Error:groovy.lang.MissingPropertyException: No such property: bootClasspath for class: com.android.builder.core.AndroidBuilder
    at com.guardsquare.dexguard.L.doCall(DexGuard7.0.19:287)
    at org.gradle.api.internal.AbstractTask$ClosureTaskAction.execute(AbstractTask.java:548)
    at org.gradle.api.internal.AbstractTask$ClosureTaskAction.execute(AbstractTask.java:529)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)

Any ideas?

@dbacinski
Copy link

@ThanosFisherman you have to use latest SNAPSHOT version

repositories {
    maven { url "https://jitpack.io" }
}
compile 'com.github.groovy:groovy-android-gradle-plugin:1b77dd6763'

marekdef pushed a commit to marekdef/gradle-coverity-plugin that referenced this issue Dec 7, 2015
@Xylez01
Copy link

Xylez01 commented Dec 9, 2015

Is there any news on when a new release is being planned?

@jaredsburrows
Copy link

+1

@lyssi
Copy link

lyssi commented Jan 4, 2016

Thanks to @dbacinski I could also work around this issue using the snapshot version. Since it's already fixed I'm also hoping for a new release soon :)!

@AndrewReitz
Copy link
Collaborator

@JordyLangen I'm working on finding a better CI option and getting some other pieces of knowledge transferred so that I can get a new release out.

@jaredsburrows
Copy link

Nothing is better than TravisCI at the moment.
On Jan 5, 2016 8:17 PM, "Andrew Reitz" [email protected] wrote:

@JordyLangen https://github.com/JordyLangen I'm working on finding a
better CI option and getting some other pieces of knowledge transferred so
that I can get a new release out.


Reply to this email directly or view it on GitHub
#61 (comment)
.

@Xylez01
Copy link

Xylez01 commented Jan 11, 2016

@pieces029 Can vouch for what @jaredsburrows says, nothing beats Travis CI

@AndrewReitz
Copy link
Collaborator

@JordyLangen No, I cannot. I didn't want to start an argument on the internet though.

@AndrewReitz
Copy link
Collaborator

This has been fixed and released in the 0.3.7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants