Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Need gradle 6.0 support #298

Closed
nyssance opened this issue Oct 30, 2019 · 12 comments
Closed

Need gradle 6.0 support #298

nyssance opened this issue Oct 30, 2019 · 12 comments

Comments

@nyssance
Copy link

No description provided.

@mattmook
Copy link

From configuring my own projects that use this plugin it appears to work fine with Gradle 6 unless you happen to use the Android Gradle plugin too, in which case I am getting the following exception:

  • What went wrong:
    A problem occurred configuring project ':orbit-android'.

Could not create an instance of type com.novoda.release.internal.compat.gradle5_3.AndroidSoftwareComponentCompat_Gradle_5_3.
org/gradle/api/internal/java/usagecontext/LazyConfigurationUsageContext

Cause in stack trace is as follows:

Caused by: java.lang.NoClassDefFoundError: org/gradle/api/internal/java/usagecontext/LazyConfigurationUsageContext
        at com.novoda.release.internal.compat.gradle5_3.AndroidSoftwareComponentCompat_Gradle_5_3.createRuntimeUsageContext(AndroidSoftwareComponentCompat_Gradle_5_3.groovy:49)
        at com.novoda.release.internal.compat.gradle5_3.AndroidSoftwareComponentCompat_Gradle_5_3.<init>(AndroidSoftwareComponentCompat_Gradle_5_3.groovy:33)
        at com.novoda.release.internal.compat.gradle5_3.AndroidSoftwareComponentCompat_Gradle_5_3_Decorated.<init>(Unknown Source)
        at org.gradle.internal.instantiation.generator.AsmBackedClassGenerator.newInstance(AsmBackedClassGenerator.java:200)
        at org.gradle.internal.instantiation.generator.AbstractClassGenerator$GeneratedClassImpl$GeneratedConstructorImpl.newInstance(AbstractClassGenerator.java:402)
        at org.gradle.internal.instantiation.generator.DependencyInjectingInstantiator.doCreate(DependencyInjectingInstantiator.java:64)
        ... 182 more

@mr-archano
Copy link
Contributor

mr-archano commented Nov 28, 2019

@mattmook thanks for the context, thanks for taking the time to make a better job than the OP.

The issue is that this plugin is and always will be a little brittle as long we keep using internal Gradle APIs in order to workaround the lack of support from the Android Gradle Plugin. This means that when something break we need to provide a new compat layer for that version of Gradle (see #283, #281, #280, etc).
Usually this is not a very complicated task, but - as one of the maintainers - at the moment I can't guarantee when this will be done, and I would encourage anyone who wants to give a try to issue a PR and start a conversation.

@erikhuizinga
Copy link

For now the solution is to stick to Gradle v5.x. The current latest v5.x version is v5.6.4, which works for and Android library project of mine with novoda/bintray-release. Find the latest v5.x release here.

@marandaneto
Copy link
Contributor

has anybody tried to make it compat. yet?

@marandaneto
Copy link
Contributor

It seems that Gradle 6.X doesn't have the class LazyConfigurationUsageContext anymore and I could not trace if its renamed, deleted or moved somewhere else.

@marandaneto
Copy link
Contributor

I've made a quick draft, tests are happy.

I don't rely on the new features of Gradle 6.x, which would be the right approach.
This would require a bit more work and brand new tests and I don't have much available time right now.

Let's see what the admins say :)

@kherembourg
Copy link

With the release of Android Studio 4.0 in stable it has become a very important issue.
The new android gradle build version is 4.0.0 which requires gradle version 6.1.1

@panpf
Copy link

panpf commented Sep 11, 2020

I have modified some codes on the basis of this library to support Gradle 6.0+ and Android Gradle Plugin 4.0+, and then released a brand new library, you can try to see if it can solve your problem, https://github.com/panpf/bintray-publish

@SuddenH4X
Copy link

Any news on this?

@EdwardW2
Copy link

Anyone working on this still and any updates to give? Would like to upgrade my Gradle to the newest version but Braintree is the only thing blocking us here.

@panpf
Copy link

panpf commented Dec 21, 2020

Anyone working on this still and any updates to give? Would like to upgrade my Gradle to the newest version but Braintree is the only thing blocking us here.

I have modified some codes on the basis of this library to support Gradle 6.0+ and Android Gradle Plugin 4.0+, and then released a brand new library, you can try to see if it can solve your problem, https://github.com/panpf/bintray-publish

stevemayhew referenced this issue in google/ExoPlayer May 21, 2021
PiperOrigin-RevId: 309231983
@babarshamsi
Copy link

i have not downgraded the gradle version 6.1.1 But what i did is that:

I removed these lines from build.gradle file
apply plugin: 'com.novoda.bintray-release' &
classpath 'com.novoda:bintray-release:0.9.1'

The Issue just gone like Boom !!

I think this Bintray Dependencies just conflicting behind the scene.

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

No branches or pull requests