I am encountering an issue while configuring my project, where the Gradle build is failing to resolve the kotlin-scripting-common-1.8.21.jar dependency with the error message "Skipped due to earlier error." This is resulting in a cascade of related download failures for other Kotlin dependencies.

Error Stack Trace:

A problem occurred configuring root project 'TickViewerPreComputation'.
> Could not resolve all files for configuration ':classpath'.
> Could not download kotlin-gradle-plugin-model-1.8.21.jar (org.jetbrains.kotlin:kotlin-gradle-plugin-model:1.8.21): Skipped due to earlier error
> Could not download kotlin-gradle-plugin-api-1.8.21-gradle76.jar (org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.8.21): Skipped due to earlier error
> Could not download kotlin-gradle-plugin-api-1.8.21.jar (org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.8.21): Skipped due to earlier error
> Could not download kotlin-gradle-plugin-1.8.21-gradle76.jar (org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.21): Skipped due to earlier error
> Could not download kotlin-gradle-plugin-idea-proto-1.8.21.jar (org.jetbrains.kotlin:kotlin-gradle-plugin-idea-proto:1.8.21): Skipped due to earlier error
> Could not download kotlin-gradle-plugin-idea-1.8.21.jar (org.jetbrains.kotlin:kotlin-gradle-plugin-idea:1.8.21): Skipped due to earlier error
> Could not download kotlin-project-model-1.8.21.jar (org.jetbrains.kotlin:kotlin-project-model:1.8.21): Skipped due to earlier error
> Could not download kotlin-tooling-core-1.8.21.jar (org.jetbrains.kotlin:kotlin-tooling-core:1.8.21): Skipped due to earlier error
> Could not download kotlin-util-klib-1.8.21.jar (org.jetbrains.kotlin:kotlin-util-klib:1.8.21): Skipped due to earlier error
> Could not download kotlin-klib-commonizer-api-1.8.21.jar (org.jetbrains.kotlin:kotlin-klib-commonizer-api:1.8.21): Skipped due to earlier error
> Could not download kotlin-annotation-processing-gradle-1.8.21.jar (org.jetbrains.kotlin:kotlin-annotation-processing-gradle:1.8.21): Skipped due to earlier error
> Could not download kotlin-android-extensions-1.8.21.jar (org.jetbrains.kotlin:kotlin-android-extensions:1.8.21): Skipped due to earlier error
> Could not download kotlin-compiler-runner-1.8.21.jar (org.jetbrains.kotlin:kotlin-compiler-runner:1.8.21): Skipped due to earlier error
> Could not download kotlin-compiler-embeddable-1.8.21.jar (org.jetbrains.kotlin:kotlin-compiler-embeddable:1.8.21): Skipped due to earlier error
> Could not download kotlin-scripting-compiler-embeddable-1.8.21.jar (org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.8.21): Skipped due to earlier error
> Could not download kotlin-scripting-compiler-impl-embeddable-1.8.21.jar (org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.8.21): Skipped due to earlier error
> Could not download kotlin-gradle-plugin-annotations-1.8.21.jar (org.jetbrains.kotlin:kotlin-gradle-plugin-annotations:1.8.21): Skipped due to earlier error
> Could not download kotlin-native-utils-1.8.21.jar (org.jetbrains.kotlin:kotlin-native-utils:1.8.21): Skipped due to earlier error
> Could not download kotlin-util-io-1.8.21.jar (org.jetbrains.kotlin:kotlin-util-io:1.8.21): Skipped due to earlier error
> Could not download kotlin-daemon-embeddable-1.8.21.jar (org.jetbrains.kotlin:kotlin-daemon-embeddable:1.8.21): Skipped due to earlier error
> Could not download kotlin-daemon-client-1.8.21.jar (org.jetbrains.kotlin:kotlin-daemon-client:1.8.21): Skipped due to earlier error
> Could not download kotlin-scripting-jvm-1.8.21.jar (org.jetbrains.kotlin:kotlin-scripting-jvm:1.8.21): Skipped due to earlier error
> Could not download kotlin-scripting-common-1.8.21.jar (org.jetbrains.kotlin:kotlin-scripting-common:1.8.21): Skipped due to earlier error

Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

Additional Information: I have set up my project with the following configurations in the build.gradle file:

import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
    kotlin("jvm") version "1.8.21"
    kotlin("plugin.allopen") version "1.8.0"
}

group = "org.example"
version = "1.0-SNAPSHOT"

repositories {
    mavenCentral()
    google()
}

dependencies {
    implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2")
    implementation ("com.influxdb:influxdb-client-kotlin:6.9.0")
    testImplementation(kotlin("test"))
    implementation(kotlin("stdlib-jdk8"))
}

tasks.test {
    useJUnitPlatform()
}

tasks.withType<KotlinCompile> {
    kotlinOptions.jvmTarget = "1.8"
}
kotlin {
    jvmToolchain(19)
}

here is my gradle-wrapper.properties

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

here is my settings.gradle.kts

plugins {
    id("org.gradle.toolchains.foojay-resolver-convention") version "0.5.0"
}
rootProject.name = "TickViewerPreComputation"

appreciate any help or insights into resolving this issue.

0

There are 0 answers