Suvra Gupta
Suvra Gupta

Reputation: 31

Not able download dependencies in build.gradle.kts file using intellij

I am doing a Spring Boot Kotlin Project. Here is my build.gradle.kts file.

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

plugins {
    id("org.springframework.boot") version "2.1.8.RELEASE"
    id("io.spring.dependency-management") version "1.0.8.RELEASE"
    kotlin("jvm") version "1.2.71"
    kotlin("plugin.spring") version "1.2.71"
}

group = "com.axis"
version = "0.0.1-SNAPSHOT"
//java.sourceCompatibility = JavaVersion.VERSION_1_8
val compileKotlin: KotlinCompile by tasks
val compileTestKotlin: KotlinCompile by tasks

compileKotlin.kotlinOptions {
   jvmTarget = "1.8"
}
compileTestKotlin.kotlinOptions {
   jvmTarget = "1.8"
}

repositories {
    mavenCentral()
}

dependencies {
    implementation("org.springframework.boot:spring-boot-starter-data-mongodb-reactive")
    implementation("org.springframework.boot:spring-boot-starter-webflux")
    implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
    implementation("org.jetbrains.kotlin:kotlin-reflect")
    implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
    implementation("org.springframework.kafka:spring-kafka")
    implementation("com.google.code.gson:gson")
    implementation("com.itextpdf:itextpdf:5.0.6")
    testImplementation("org.springframework.boot:spring-boot-starter-test")
    testImplementation("de.flapdoodle.embed:de.flapdoodle.embed.mongo")
    testImplementation("io.projectreactor:reactor-test")
    testImplementation("io.mockk:mockk:1.9.3")
   }

tasks.withType<KotlinCompile> {
    kotlinOptions {
       freeCompilerArgs = listOf("-Xjsr305=strict")
       jvmTarget = "1.8"
   }
}

I am adding the mockk dependency but it is not getting downloaded. Neither of the dependencies are getting downloaded. The build is successful but the dependency which I add don't get downloaded. I have disabled my proxy and tried. I have checked the below link and tried out. But it doesn't work

Gradle build doesn't download dependencies

Any help will be appreciated.

Upvotes: 1

Views: 1256

Answers (1)

Suvra Gupta
Suvra Gupta

Reputation: 31

I was able to resolve this. When i switched to a different network i was able to download. Not sure as to why i was being blocked to download dependencies in some network.

Upvotes: 1

Related Questions