gradle-advanced-build-version icon indicating copy to clipboard operation
gradle-advanced-build-version copied to clipboard

Does not work with Gradle 7.x

Open oliverlockwood opened this issue 2 years ago • 8 comments

I see the following error:

> Could not resolve all artifacts for configuration ':app:classpath'.
   > Could not find com.android.tools.build:gradle:3.0.0.
     Searched in the following locations:
       - https://plugins.gradle.org/m2/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
     Required by:
         project :app > me.moallemi.gradle:advanced-build-version:1.7.3

I can see that there's been a commit in support of Gradle 7.x, but there's been no releases yet.

@moallemi any chance of you publishing a release so that we can work with Gradle 7.x, please? Many thanks.

oliverlockwood avatar Sep 08 '21 09:09 oliverlockwood

@oliverlockwood You can use v1.7.4 which is compatible with AGP 7.x

moallemi avatar Sep 10 '21 20:09 moallemi

@moallemi this still doesn't work:

* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all artifacts for configuration ':app:classpath'.
   > Could not find com.android.tools.build:gradle:7.0.0-beta03.
     Searched in the following locations:
       - https://plugins.gradle.org/m2/com/android/tools/build/gradle/7.0.0-beta03/gradle-7.0.0-beta03.pom
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
     Required by:
         project :app > me.moallemi.gradle:advanced-build-version:1.7.4

oliverlockwood avatar Sep 13 '21 14:09 oliverlockwood

For anyone having the same problem, you're using the jcenter() repo. MavenCentral hosts version 1.7.4.

Nek-12 avatar Oct 21 '21 11:10 Nek-12

@moallemi bump - this problem (as I described on 13th September) is still there. Any chance you could fix and release a new version which doesn't use a beta version of the 7.x plugin?

oliverlockwood avatar Oct 27 '21 13:10 oliverlockwood

AGP 7.1.2 Gradle 7.2

An exception occurred applying plugin request [id: 'me.moallemi.advanced-build-version', version: '2.0.0']

Failed to apply plugin 'me.moallemi.advanced-build-version'. The Android Gradle plugin not found. gradle-advanced-build-version only works with Android gradle library.

murdak avatar Apr 07 '22 06:04 murdak

@murdak Based on error message it seems that you are applying this plugin on a Non-Android repository. make sure that you follow the docs for setting up the library

moallemi avatar Apr 09 '22 06:04 moallemi

Can you elaborate? Do you have a sample app project? I'm using latest android studio (bumblebee). Created a project with basic activity, and then follow README instructions for installation and usage of plugin. After syncing I get the error I posted.

Here is from build.gradle

plugins { id 'com.android.application' version '7.1.1' apply false id 'com.android.library' version '7.1.1' apply false id 'org.jetbrains.kotlin.android' version '1.6.10' apply false

id "me.moallemi.advanced-build-version" version "2.0.0"

}

murdak avatar Apr 09 '22 08:04 murdak

@murdak Thank you for raising this issue. I have to update the plugin to support the new project setup. but for now you can follow these steps:

in root build.gradle

CleanShot 2022-04-09 at 11 15 47@2x

in app build.gradle

CleanShot 2022-04-09 at 11 16 11@2x

moallemi avatar Apr 09 '22 09:04 moallemi