-
Notifications
You must be signed in to change notification settings - Fork 274
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
WARNING: API 'variant.getJavaCompile()' is obsolete #295
Comments
A naive solution may be something like: if (variant.hasProperty('javaCompileProvider')) {
// Android 3.3.0+
javaCompileTask = variant.javaCompileProvider.get()
} else {
javaCompileTask = variant.javaCompile
} Because |
@zhangkun83 thanks for looking at this. I tried building the plugin locally with your proposed solution and can report that the warning went away in the Android Studio 3.3 (Gradle 4.10.1 ) case and that nothing broke in the Android 2.2 (Gradle 4.6) case. Hope that helps. |
@komakai thank you for confirming! |
This is currently still going on even when using Android Studio 3.3.0 with Gradle 5.5.0. Still getting the warning. Is there any projected timeline if this will be fixed in the future as it will be removed in 2019? |
Have you all found a way to suppress this warning in the mean time? Experiencing the same issue |
This issue still happens with
|
@zhangkun83 thanks for fixing this. Any chance you could make a new release with the fix included? Thanks. |
I was hoping to get #309 resolved and make a release. |
Hi, |
Same problem where should I need to put this code? |
Sorry for the long wait. v0.8.9 is released and includes this fix. We have some issue in releasing it on Gradle Plugins Portal. So this release is currently limited to Maven Central via the |
I modified my build.gradle changing the line
to
and unfortunately I still get the same warning. Stack trace looks the same. |
Yeah, I believe this is due to line 442 here:
The
|
@kcoppock Yes, you are right. That is a very accurate one-line fix. 👍 I tried with both android 3.3.0 and 3.4.1, no longer get the warning. |
The fix is included in 0.8.10 just released. |
use this dependancy :- classpath 'io.fabric.tools:gradle:1.+' |
I am using the protobuf plugin in Android Studio 3.3 with Gradle plugin 4.10.1 and get the following warning:
When I run the suggested diagnostics it outputs the very long stack-trace included below.
Analyzing the trace it seems Gradle objects to the use of
variant.javaCompile
here:
protobuf-gradle-plugin/src/main/groovy/com/google/protobuf/gradle/ProtobufPlugin.groovy
Line 439 in 1ca413e
Stack trace:
The text was updated successfully, but these errors were encountered: