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

Plugin requires Java 15 #35

Open
lukasz-kalnik-gcx opened this issue Nov 25, 2022 · 0 comments
Open

Plugin requires Java 15 #35

lukasz-kalnik-gcx opened this issue Nov 25, 2022 · 0 comments

Comments

@lukasz-kalnik-gcx
Copy link

lukasz-kalnik-gcx commented Nov 25, 2022

Kotlin 1.7.20
Android Gradle Plugin 7.3.1
Gradle 7.5.1

I have built the plugin to the local Maven repository and modified my project's main build.gradle.kts like this:

buildscript {
    repositories {
        mavenLocal()
        google()
        mavenCentral()
    }
    dependencies {
        classpath("com.android.gradle.replicator:project-replicator:0.2")
        classpath(libs.kotlin.pluginGradle)
        classpath(libs.android.pluginGradle)
    }
}

allprojects {
    repositories {
        google()
        mavenCentral()

    apply {
        plugin("com.android.gradle.replicator.ProjectReplicatorPlugin")
    }

    tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class) {
        kotlinOptions.jvmTarget = JavaVersion.VERSION_11.toString()
    }
}

However when syncing Gradle I get the following error:

> Could not determine the dependencies of null.
   > Could not resolve all task dependencies for configuration ':classpath'.
      > Could not resolve com.android.gradle.replicator:project-replicator:0.2.
        Required by:
            project :
         > No matching variant of com.android.gradle.replicator:project-replicator:0.2 was found. The consumer was configured to find a runtime of a library compatible with Java 11, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '7.5.1' but:
             - Variant 'apiElements' capability com.android.gradle.replicator:project-replicator:0.2 declares a library, packaged as a jar, and its dependencies declared externally:
                 - Incompatible because this component declares an API of a component compatible with Java 15 and the consumer needed a runtime of a component compatible with Java 11
                 - Other compatible attribute:
                     - Doesn't say anything about org.gradle.plugin.api-version (required '7.5.1')
             - Variant 'runtimeElements' capability com.android.gradle.replicator:project-replicator:0.2 declares a runtime of a library, packaged as a jar, and its dependencies declared externally:
                 - Incompatible because this component declares a component compatible with Java 15 and the consumer needed a component compatible with Java 11
                 - Other compatible attribute:
                     - Doesn't say anything about org.gradle.plugin.api-version (required '7.5.1')
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

1 participant