Skip to content

Plugin requires Java 15 #35

@lukasz-kalnik-gcx

Description

@lukasz-kalnik-gcx

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')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions