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

Does not work with Gradle 7.x #59

Closed
oliverlockwood opened this issue Sep 8, 2021 · 8 comments · Fixed by #66
Closed

Does not work with Gradle 7.x #59

oliverlockwood opened this issue Sep 8, 2021 · 8 comments · Fixed by #66

Comments

@oliverlockwood
Copy link

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.

@moallemi
Copy link
Owner

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

@oliverlockwood
Copy link
Author

@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

@Nek-12
Copy link

Nek-12 commented Oct 21, 2021

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

@oliverlockwood
Copy link
Author

@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?

@murdak
Copy link

murdak commented Apr 7, 2022

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.

@moallemi
Copy link
Owner

moallemi commented Apr 9, 2022

@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

@murdak
Copy link

murdak commented Apr 9, 2022

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"

}

@moallemi
Copy link
Owner

moallemi commented Apr 9, 2022

@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

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

Successfully merging a pull request may close this issue.

4 participants