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

why this version not found in gradle? #2021

Open
unnamedw opened this issue Aug 5, 2024 · 3 comments
Open

why this version not found in gradle? #2021

unnamedw opened this issue Aug 5, 2024 · 3 comments

Comments

@unnamedw
Copy link

unnamedw commented Aug 5, 2024

I'm an android developer. Why on earth does this error occur when adding ksp to gradle?

The official Android document says to add 1.8.10-1.0.9, but Plugin [id: 'com.google.devtools.ksp', version: '1.8.10-1.0.9', apply: false] was not found in any of the following sources: This error occurs. Of course, there is no problem with the repository path.

The same applies if you use 1.9.0-1.0.13 in the release version.
these versions are in releases. why cannot work?

this version works thought
1.9.24-1.0.20

this is my settings.gradle code below

pluginManagement {
    repositories {
        google {
            content {
                includeGroupByRegex("com\\.android.*")
                includeGroupByRegex("com\\.google.*")
                includeGroupByRegex("androidx.*")
            }
        }
        mavenCentral()
        gradlePluginPortal()
    }
}
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
    }
}
@efemoney
Copy link

efemoney commented Aug 5, 2024

KSP is published to maven central since 1.5 / 1.6.
But your google repo content rule is basically constraining it to be found only in google.

To fix this, you can either move mavenCentral upwards or excludeGroupBy... to exclude com.google.devtools.ksp

@unnamedw
Copy link
Author

unnamedw commented Aug 6, 2024

KSP is published to maven central since 1.5 / 1.6. But your google repo content rule is basically constraining it to be found only in google.

To fix this, you can either move mavenCentral upwards or excludeGroupBy... to exclude com.google.devtools.ksp

really...? But just a day later, I built it again with the same code and it worked. Why?
1.8.10-1.0.9
1.9.0-1.0.13
above versions.

Sorry, it's not. my mistake.

@unnamedw
Copy link
Author

unnamedw commented Aug 6, 2024

KSP is published to maven central since 1.5 / 1.6. But your google repo content rule is basically constraining it to be found only in google.

To fix this, you can either move mavenCentral upwards or excludeGroupBy... to exclude com.google.devtools.ksp

I'm sorry. I didn't understand it exactly.
Obviously mavenCentral is specified in the path to find the repository, but why am I restricted by the google repository? Please explain in a little more detail with line by line.
thank you :)

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

2 participants