plugins { kotlin("jvm") } repositories { mavenCentral() } val gsonDepVersion: String by project val specifyKotlinAsDependency: String by project dependencies { testImplementation("org.jetbrains.kotlin:kotlin-test") implementation(project(":linear-algebra")) implementation(project(":gson")) implementation(project(":")) implementation("com.google.code.gson:gson:$gsonDepVersion") } publishing { publications { create("mavenJava") { from(components["java"]) artifact(tasks["sourceJar"]) pom { dependencies { if (specifyKotlinAsDependency.toBoolean()) implementation(kotlin("stdlib")) implementation(project(":linear-algebra")) implementation(project(":gson")) implementation(project(":")) implementation("com.google.code.gson:gson:[2.8,)") } } } } }