Generate new Gradle dependency directives when is version above 3.4 (KT-22571)
^KT-22571 Fixed
This commit is contained in:
+15
-2
@@ -79,10 +79,9 @@ private fun gradleVersionFromFile(psiFile: PsiFile): GradleVersion? {
|
||||
|
||||
val MIN_GRADLE_VERSION_FOR_NEW_PLUGIN_SYNTAX = GradleVersion.version("4.4")
|
||||
|
||||
fun GradleBuildScriptManipulator<*>.useNewSyntax(kotlinPluginName: String): Boolean {
|
||||
fun GradleBuildScriptManipulator<*>.useNewSyntax(kotlinPluginName: String, gradleVersion: GradleVersion): Boolean {
|
||||
if (!preferNewSyntax) return false
|
||||
|
||||
val gradleVersion = fetchGradleVersion(scriptFile)
|
||||
if (gradleVersion < MIN_GRADLE_VERSION_FOR_NEW_PLUGIN_SYNTAX) return false
|
||||
|
||||
if (isConfiguredWithOldSyntax(kotlinPluginName)) return false
|
||||
@@ -91,4 +90,18 @@ fun GradleBuildScriptManipulator<*>.useNewSyntax(kotlinPluginName: String): Bool
|
||||
val hasOldApply = fileText.contains("apply plugin:")
|
||||
|
||||
return !hasOldApply
|
||||
}
|
||||
|
||||
private val MIN_GRADLE_VERSION_FOR_API_AND_IMPLEMENTATION = GradleVersion.version("3.4")
|
||||
|
||||
fun GradleVersion.scope(directive: String): String {
|
||||
if (this < MIN_GRADLE_VERSION_FOR_API_AND_IMPLEMENTATION) {
|
||||
return when (directive) {
|
||||
"implementation" -> "compile"
|
||||
"testImplementation" -> "testCompile"
|
||||
else -> throw IllegalArgumentException("Unknown directive `$directive`")
|
||||
}
|
||||
}
|
||||
|
||||
return directive
|
||||
}
|
||||
+19
-5
@@ -65,6 +65,10 @@ interface GradleBuildScriptManipulator<out Psi : PsiFile> {
|
||||
fun addResolutionStrategy(pluginId: String)
|
||||
}
|
||||
|
||||
|
||||
// Kept for compatibility reasons (pre-181.3 IDEAs)
|
||||
val BuildScriptDataBuilder.gradleVersion get() = GradleVersion.version("0.0")
|
||||
|
||||
fun fetchGradleVersion(psiFile: PsiFile): GradleVersion {
|
||||
return gradleVersionFromFile(psiFile) ?: GradleVersion.current()
|
||||
}
|
||||
@@ -75,13 +79,9 @@ private fun gradleVersionFromFile(psiFile: PsiFile): GradleVersion? {
|
||||
|
||||
val MIN_GRADLE_VERSION_FOR_NEW_PLUGIN_SYNTAX = GradleVersion.version("4.4")
|
||||
|
||||
// Kept for compatibility reasons (pre-181.3 IDEAs)
|
||||
val BuildScriptDataBuilder.gradleVersion get() = GradleVersion.version("0.0")
|
||||
|
||||
fun GradleBuildScriptManipulator<*>.useNewSyntax(kotlinPluginName: String): Boolean {
|
||||
fun GradleBuildScriptManipulator<*>.useNewSyntax(kotlinPluginName: String, gradleVersion: GradleVersion): Boolean {
|
||||
if (!preferNewSyntax) return false
|
||||
|
||||
val gradleVersion = fetchGradleVersion(scriptFile)
|
||||
if (gradleVersion < MIN_GRADLE_VERSION_FOR_NEW_PLUGIN_SYNTAX) return false
|
||||
|
||||
if (isConfiguredWithOldSyntax(kotlinPluginName)) return false
|
||||
@@ -90,4 +90,18 @@ fun GradleBuildScriptManipulator<*>.useNewSyntax(kotlinPluginName: String): Bool
|
||||
val hasOldApply = fileText.contains("apply plugin:")
|
||||
|
||||
return !hasOldApply
|
||||
}
|
||||
|
||||
private val MIN_GRADLE_VERSION_FOR_API_AND_IMPLEMENTATION = GradleVersion.version("3.4")
|
||||
|
||||
fun GradleVersion.scope(directive: String): String {
|
||||
if (this < MIN_GRADLE_VERSION_FOR_API_AND_IMPLEMENTATION) {
|
||||
return when (directive) {
|
||||
"implementation" -> "compile"
|
||||
"testImplementation" -> "testCompile"
|
||||
else -> throw IllegalArgumentException("Unknown directive `$directive`")
|
||||
}
|
||||
}
|
||||
|
||||
return directive
|
||||
}
|
||||
+7
-4
@@ -81,7 +81,8 @@ abstract class GradleKotlinFrameworkSupportProvider(
|
||||
kotlinVersion = LAST_SNAPSHOT_VERSION
|
||||
}
|
||||
|
||||
val useNewSyntax = buildScriptData.gradleVersion >= MIN_GRADLE_VERSION_FOR_NEW_PLUGIN_SYNTAX
|
||||
val gradleVersion = buildScriptData.gradleVersion
|
||||
val useNewSyntax = gradleVersion >= MIN_GRADLE_VERSION_FOR_NEW_PLUGIN_SYNTAX
|
||||
if (useNewSyntax) {
|
||||
if (additionalRepository != null) {
|
||||
val oneLineRepository = additionalRepository.toGroovyRepositorySnippet().replace('\n', ' ')
|
||||
@@ -117,14 +118,16 @@ abstract class GradleKotlinFrameworkSupportProvider(
|
||||
buildScriptData.addRepositoriesDefinition("mavenCentral()")
|
||||
|
||||
for (dependency in getDependencies(sdk)) {
|
||||
buildScriptData.addDependencyNotation(KotlinWithGradleConfigurator.getGroovyDependencySnippet(dependency, "compile", !useNewSyntax))
|
||||
buildScriptData.addDependencyNotation(
|
||||
KotlinWithGradleConfigurator.getGroovyDependencySnippet(dependency, "implementation", !useNewSyntax, gradleVersion)
|
||||
)
|
||||
}
|
||||
for (dependency in getTestDependencies()) {
|
||||
buildScriptData.addDependencyNotation(
|
||||
if (":" in dependency)
|
||||
"testCompile \"$dependency\""
|
||||
"${gradleVersion.scope("testImplementation")} \"$dependency\""
|
||||
else
|
||||
KotlinWithGradleConfigurator.getGroovyDependencySnippet(dependency, "testCompile", !useNewSyntax)
|
||||
KotlinWithGradleConfigurator.getGroovyDependencySnippet(dependency, "testImplementation", !useNewSyntax, gradleVersion)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
+13
-5
@@ -21,6 +21,7 @@ import com.intellij.openapi.roots.ExternalLibraryDescriptor
|
||||
import com.intellij.openapi.util.text.StringUtil
|
||||
import com.intellij.psi.PsiElement
|
||||
import com.intellij.psi.codeStyle.CodeStyleManager
|
||||
import org.gradle.util.GradleVersion
|
||||
import org.jetbrains.kotlin.cli.common.arguments.CliArgumentStringBuilder.buildArgumentString
|
||||
import org.jetbrains.kotlin.cli.common.arguments.CliArgumentStringBuilder.replaceLanguageFeature
|
||||
import org.jetbrains.kotlin.config.LanguageFeature
|
||||
@@ -43,6 +44,8 @@ class GroovyBuildScriptManipulator(
|
||||
override val scriptFile: GroovyFile,
|
||||
override val preferNewSyntax: Boolean
|
||||
) : GradleBuildScriptManipulator<GroovyFile> {
|
||||
private val gradleVersion = fetchGradleVersion(scriptFile)
|
||||
|
||||
override fun isConfiguredWithOldSyntax(kotlinPluginName: String): Boolean {
|
||||
val fileText = runReadAction { scriptFile.text }
|
||||
return containsDirective(fileText, getApplyPluginDirective(kotlinPluginName)) &&
|
||||
@@ -67,7 +70,7 @@ class GroovyBuildScriptManipulator(
|
||||
): Boolean {
|
||||
val oldText = scriptFile.text
|
||||
|
||||
val useNewSyntax = useNewSyntax(kotlinPluginName)
|
||||
val useNewSyntax = useNewSyntax(kotlinPluginName, gradleVersion)
|
||||
if (useNewSyntax) {
|
||||
scriptFile
|
||||
.getPluginsBlock()
|
||||
@@ -109,7 +112,11 @@ class GroovyBuildScriptManipulator(
|
||||
}
|
||||
|
||||
scriptFile.getDependenciesBlock().apply {
|
||||
addExpressionOrStatementInBlockIfNeeded(getGroovyDependencySnippet(stdlibArtifactName, !useNewSyntax), false, false)
|
||||
addExpressionOrStatementInBlockIfNeeded(
|
||||
getGroovyDependencySnippet(stdlibArtifactName, !useNewSyntax, gradleVersion),
|
||||
isStatement = false,
|
||||
isFirst = false
|
||||
)
|
||||
}
|
||||
|
||||
if (jvmTarget != null) {
|
||||
@@ -121,7 +128,7 @@ class GroovyBuildScriptManipulator(
|
||||
}
|
||||
|
||||
override fun configureProjectBuildScript(kotlinPluginName: String, version: String): Boolean {
|
||||
if (useNewSyntax(kotlinPluginName)) return false
|
||||
if (useNewSyntax(kotlinPluginName, gradleVersion)) return false
|
||||
|
||||
val oldText = scriptFile.text
|
||||
scriptFile.apply {
|
||||
@@ -347,8 +354,9 @@ class GroovyBuildScriptManipulator(
|
||||
|
||||
private fun getGroovyDependencySnippet(
|
||||
artifactName: String,
|
||||
withVersion: Boolean
|
||||
) = "implementation \"org.jetbrains.kotlin:$artifactName${if (withVersion) ":\$kotlin_version" else ""}\""
|
||||
withVersion: Boolean,
|
||||
gradleVersion: GradleVersion
|
||||
) = "${gradleVersion.scope("implementation")} \"org.jetbrains.kotlin:$artifactName${if (withVersion) ":\$kotlin_version" else ""}\""
|
||||
|
||||
private fun getApplyPluginDirective(pluginName: String) = "apply plugin: '$pluginName'"
|
||||
|
||||
|
||||
+14
-5
@@ -37,6 +37,8 @@ class KotlinBuildScriptManipulator(
|
||||
override val scriptFile: KtFile,
|
||||
override val preferNewSyntax: Boolean
|
||||
) : GradleBuildScriptManipulator<KtFile> {
|
||||
private val gradleVersion = fetchGradleVersion(scriptFile)
|
||||
|
||||
override fun isConfiguredWithOldSyntax(kotlinPluginName: String) = runReadAction {
|
||||
scriptFile.containsApplyKotlinPlugin(kotlinPluginName) && scriptFile.containsCompileStdLib()
|
||||
}
|
||||
@@ -46,7 +48,7 @@ class KotlinBuildScriptManipulator(
|
||||
}
|
||||
|
||||
override fun configureProjectBuildScript(kotlinPluginName: String, version: String): Boolean {
|
||||
if (useNewSyntax(kotlinPluginName)) return false
|
||||
if (useNewSyntax(kotlinPluginName, gradleVersion)) return false
|
||||
|
||||
val originalText = scriptFile.text
|
||||
scriptFile.getBuildScriptBlock()?.apply {
|
||||
@@ -73,7 +75,7 @@ class KotlinBuildScriptManipulator(
|
||||
jvmTarget: String?
|
||||
): Boolean {
|
||||
val originalText = scriptFile.text
|
||||
val useNewSyntax = useNewSyntax(kotlinPluginName)
|
||||
val useNewSyntax = useNewSyntax(kotlinPluginName, gradleVersion)
|
||||
scriptFile.apply {
|
||||
if (useNewSyntax) {
|
||||
createPluginInPluginsGroupIfMissing(kotlinPluginExpression, version)
|
||||
@@ -179,7 +181,7 @@ class KotlinBuildScriptManipulator(
|
||||
}
|
||||
|
||||
private fun KtBlockExpression.addNoVersionCompileStdlibIfMissing(stdlibArtifactName: String): KtCallExpression? =
|
||||
findStdLibDependency() ?: addExpressionIfMissing("compile(${getKotlinModuleDependencySnippet(stdlibArtifactName, null)})") as? KtCallExpression
|
||||
findStdLibDependency() ?: addExpressionIfMissing("implementation(${getKotlinModuleDependencySnippet(stdlibArtifactName, null)})") as? KtCallExpression
|
||||
|
||||
private fun KtFile.containsCompileStdLib(): Boolean =
|
||||
findScriptInitializer("dependencies")?.getBlock()?.findStdLibDependency() != null
|
||||
@@ -470,13 +472,20 @@ class KotlinBuildScriptManipulator(
|
||||
groupId: String,
|
||||
artifactId: String,
|
||||
version: String?,
|
||||
compileScope: String = "compile"
|
||||
compileScope: String = "implementation"
|
||||
): String {
|
||||
if (groupId != KOTLIN_GROUP_ID) {
|
||||
return "$compileScope(\"$groupId:$artifactId:$version\")"
|
||||
}
|
||||
|
||||
if (useNewSyntax(if (scriptFile.module?.getBuildSystemType() == AndroidGradle) "kotlin-android" else KotlinGradleModuleConfigurator.KOTLIN)) {
|
||||
val kotlinPluginName =
|
||||
if (scriptFile.module?.getBuildSystemType() == AndroidGradle) {
|
||||
"kotlin-android"
|
||||
} else {
|
||||
KotlinGradleModuleConfigurator.KOTLIN
|
||||
}
|
||||
|
||||
if (useNewSyntax(kotlinPluginName, gradleVersion)) {
|
||||
return "$compileScope(${getKotlinModuleDependencySnippet(artifactId)})"
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -121,7 +121,7 @@ class KotlinDslGradleKotlinJavaFrameworkSupportProvider :
|
||||
override fun getPluginDefinition() = "kotlin(\"jvm\")"
|
||||
|
||||
override fun getRuntimeLibrary(rootModel: ModifiableRootModel, version: String?) =
|
||||
"compile(${getKotlinModuleDependencySnippet(getStdlibArtifactId(rootModel.sdk, bundledRuntimeVersion()), version)})"
|
||||
"implementation(${getKotlinModuleDependencySnippet(getStdlibArtifactId(rootModel.sdk, bundledRuntimeVersion()), version)})"
|
||||
|
||||
override fun addSupport(
|
||||
projectId: ProjectId,
|
||||
@@ -147,7 +147,7 @@ class KotlinDslGradleKotlinJSFrameworkSupportProvider :
|
||||
override fun getPluginDefinition(): String = "id(\"kotlin2js\")"
|
||||
|
||||
override fun getRuntimeLibrary(rootModel: ModifiableRootModel, version: String?) =
|
||||
"compile(${getKotlinModuleDependencySnippet(MAVEN_JS_STDLIB_ID.removePrefix("kotlin-"), version)})"
|
||||
"implementation(${getKotlinModuleDependencySnippet(MAVEN_JS_STDLIB_ID.removePrefix("kotlin-"), version)})"
|
||||
|
||||
override fun addSupport(
|
||||
projectId: ProjectId,
|
||||
|
||||
+3
-1
@@ -34,7 +34,9 @@ class KotlinJsGradleModuleConfigurator : KotlinWithGradleConfigurator() {
|
||||
override fun getStdlibArtifactName(sdk: Sdk?, version: String): String = MAVEN_JS_STDLIB_ID
|
||||
|
||||
override fun addElementsToFile(file: PsiFile, isTopLevelProjectFile: Boolean, version: String): Boolean {
|
||||
if (getManipulator(file).useNewSyntax(kotlinPluginName)) {
|
||||
val gradleVersion = fetchGradleVersion(file)
|
||||
|
||||
if (getManipulator(file).useNewSyntax(kotlinPluginName, gradleVersion)) {
|
||||
val settingsPsiFile = if (isTopLevelProjectFile) {
|
||||
file.module?.getTopLevelBuildScriptSettingsPsiFile()
|
||||
} else {
|
||||
|
||||
+7
-2
@@ -25,6 +25,7 @@ import com.intellij.psi.PsiElement
|
||||
import com.intellij.psi.PsiFile
|
||||
import com.intellij.psi.PsiManager
|
||||
import com.intellij.util.PathUtil
|
||||
import org.gradle.util.GradleVersion
|
||||
import org.jetbrains.kotlin.config.ApiVersion
|
||||
import org.jetbrains.kotlin.config.CoroutineSupport
|
||||
import org.jetbrains.kotlin.config.LanguageFeature
|
||||
@@ -302,8 +303,12 @@ abstract class KotlinWithGradleConfigurator : KotlinProjectConfigurator {
|
||||
private val KOTLIN_BUILD_SCRIPT_NAME = "build.gradle.kts"
|
||||
private val KOTLIN_SETTINGS_SCRIPT_NAME = "settings.gradle.kts"
|
||||
|
||||
fun getGroovyDependencySnippet(artifactName: String, scope: String, withVersion: Boolean) =
|
||||
"$scope \"org.jetbrains.kotlin:$artifactName${if (withVersion) ":\$kotlin_version" else ""}\""
|
||||
fun getGroovyDependencySnippet(artifactName: String, scope: String, withVersion: Boolean, gradleVersion: GradleVersion): String {
|
||||
val updatedScope = gradleVersion.scope(scope)
|
||||
val versionStr = if (withVersion) ":\$kotlin_version" else ""
|
||||
|
||||
return "$updatedScope \"org.jetbrains.kotlin:$artifactName$versionStr\""
|
||||
}
|
||||
|
||||
fun getGroovyApplyPluginDirective(pluginName: String) = "apply plugin: '$pluginName'"
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ apply {
|
||||
plugin("kotlin-android")
|
||||
}
|
||||
dependencies {
|
||||
compile(kotlinModule("stdlib-jdk7", kotlin_version))
|
||||
implementation(kotlinModule("stdlib-jdk7", kotlin_version))
|
||||
}
|
||||
repositories {
|
||||
mavenCentral()
|
||||
|
||||
@@ -41,7 +41,7 @@ android {
|
||||
dependencies {
|
||||
compile("com.android.support:appcompat-v7:23.4.0")
|
||||
compile("com.android.support.constraint:constraint-layout:1.0.0-alpha8")
|
||||
compile(kotlinModule("stdlib-jdk7", kotlin_version))
|
||||
implementation(kotlinModule("stdlib-jdk7", kotlin_version))
|
||||
}
|
||||
|
||||
repositories {
|
||||
|
||||
@@ -10,7 +10,7 @@ repositories {
|
||||
|
||||
dependencies {
|
||||
testCompile group: 'junit', name: 'junit', version: '4.11'
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||
}
|
||||
buildscript {
|
||||
ext.kotlin_version = '$VERSION$'
|
||||
|
||||
@@ -11,7 +11,7 @@ repositories {
|
||||
|
||||
dependencies {
|
||||
testCompile group: 'junit', name: 'junit', version: '4.11'
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
}
|
||||
buildscript {
|
||||
ext.kotlin_version = '$VERSION$'
|
||||
|
||||
@@ -5,7 +5,7 @@ repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib-jre8"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre8"
|
||||
}
|
||||
compileKotlin {
|
||||
kotlinOptions {
|
||||
|
||||
@@ -7,5 +7,5 @@ repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib-js"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-js"
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ repositories {
|
||||
|
||||
dependencies {
|
||||
testCompile group: 'junit', name: 'junit', version: '4.11'
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
}
|
||||
buildscript {
|
||||
ext.kotlin_version = '$VERSION$'
|
||||
|
||||
@@ -6,7 +6,7 @@ version = '1.0'
|
||||
|
||||
dependencies {
|
||||
testCompile group: 'junit', name: 'junit', version: '4.11'
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||
}
|
||||
|
||||
buildscript {
|
||||
|
||||
@@ -6,7 +6,7 @@ version = '1.0'
|
||||
|
||||
dependencies {
|
||||
testCompile group: 'junit', name: 'junit', version: '4.11'
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||
}
|
||||
|
||||
buildscript {
|
||||
|
||||
@@ -11,7 +11,7 @@ repositories {
|
||||
|
||||
dependencies {
|
||||
testCompile group: 'junit', name: 'junit', version: '4.11'
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
}
|
||||
buildscript {
|
||||
ext.kotlin_version = '$VERSION$'
|
||||
|
||||
@@ -10,7 +10,7 @@ repositories {
|
||||
|
||||
dependencies {
|
||||
testCompile group: 'junit', name: 'junit', version: '4.11'
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||
}
|
||||
buildscript {
|
||||
ext.kotlin_version = '$VERSION$'
|
||||
|
||||
@@ -17,7 +17,7 @@ repositories {
|
||||
|
||||
dependencies {
|
||||
testCompile("junit:junit:4.12")
|
||||
compile(kotlin("stdlib-jre8"))
|
||||
implementation(kotlin("stdlib-jre8"))
|
||||
}
|
||||
|
||||
// VERSION: $VERSION$
|
||||
|
||||
@@ -16,7 +16,7 @@ repositories {
|
||||
|
||||
dependencies {
|
||||
testCompile("junit:junit:4.12")
|
||||
compile(kotlin("stdlib"))
|
||||
implementation(kotlin("stdlib"))
|
||||
}
|
||||
|
||||
// VERSION: $VERSION$
|
||||
@@ -16,7 +16,7 @@ repositories {
|
||||
|
||||
dependencies {
|
||||
testCompile("junit:junit:4.12")
|
||||
compile(kotlin("stdlib-jdk8"))
|
||||
implementation(kotlin("stdlib-jdk8"))
|
||||
}
|
||||
val compileKotlin: KotlinCompile by tasks
|
||||
compileKotlin.kotlinOptions {
|
||||
|
||||
@@ -30,7 +30,7 @@ repositories {
|
||||
|
||||
dependencies {
|
||||
testCompile("junit:junit:4.12")
|
||||
compile(kotlin("stdlib-jdk8"))
|
||||
implementation(kotlin("stdlib-jdk8"))
|
||||
}
|
||||
val compileKotlin: KotlinCompile by tasks
|
||||
compileKotlin.kotlinOptions {
|
||||
|
||||
@@ -20,7 +20,7 @@ repositories {
|
||||
|
||||
dependencies {
|
||||
testCompile("junit:junit:4.12")
|
||||
compile(kotlin("stdlib-jdk8"))
|
||||
implementation(kotlin("stdlib-jdk8"))
|
||||
}
|
||||
val compileKotlin: KotlinCompile by tasks
|
||||
compileKotlin.kotlinOptions {
|
||||
|
||||
@@ -13,5 +13,5 @@ repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
}
|
||||
|
||||
@@ -11,5 +11,5 @@ repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib"
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ apply {
|
||||
plugin("kotlin")
|
||||
}
|
||||
dependencies {
|
||||
compile(kotlinModule("stdlib-jre8", kotlin_version))
|
||||
implementation(kotlinModule("stdlib-jre8", kotlin_version))
|
||||
}
|
||||
repositories {
|
||||
mavenCentral()
|
||||
|
||||
@@ -10,7 +10,7 @@ buildscript {
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
compile(kotlin("stdlib-jre8"))
|
||||
implementation(kotlin("stdlib-jre8"))
|
||||
}
|
||||
repositories {
|
||||
mavenCentral()
|
||||
|
||||
Vendored
+1
-1
@@ -18,7 +18,7 @@ apply {
|
||||
plugin("kotlin")
|
||||
}
|
||||
dependencies {
|
||||
compile(kotlinModule("stdlib-jdk8", kotlin_version))
|
||||
implementation(kotlinModule("stdlib-jdk8", kotlin_version))
|
||||
}
|
||||
repositories {
|
||||
maven { setUrl("https://teamcity.jetbrains.com/guestAuth/app/rest/builds/buildType:(id:Kotlin_dev_Compiler),number:1.2.60-dev-286,branch:default:any/artifacts/content/maven/") }
|
||||
|
||||
Vendored
+1
-1
@@ -6,7 +6,7 @@ plugins {
|
||||
group = "testgroup"
|
||||
version = "1.0-SNAPSHOT"
|
||||
dependencies {
|
||||
compile(kotlin("stdlib-jdk8"))
|
||||
implementation(kotlin("stdlib-jdk8"))
|
||||
}
|
||||
repositories {
|
||||
maven { setUrl("https://teamcity.jetbrains.com/guestAuth/app/rest/builds/buildType:(id:Kotlin_dev_Compiler),number:1.2.60-dev-286,branch:default:any/artifacts/content/maven/") }
|
||||
|
||||
+1
-1
@@ -9,5 +9,5 @@ repositories {
|
||||
maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
|
||||
}
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib-js"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-js"
|
||||
}
|
||||
|
||||
+1
-1
@@ -9,5 +9,5 @@ repositories {
|
||||
maven { setUrl("https://dl.bintray.com/kotlin/kotlin-eap") }
|
||||
}
|
||||
dependencies {
|
||||
compile(kotlin("stdlib-js"))
|
||||
implementation(kotlin("stdlib-js"))
|
||||
}
|
||||
|
||||
+1
-1
@@ -8,5 +8,5 @@ repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib-js"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-js"
|
||||
}
|
||||
|
||||
+1
-1
@@ -8,5 +8,5 @@ repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
compile(kotlin("stdlib-js"))
|
||||
implementation(kotlin("stdlib-js"))
|
||||
}
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ repositories {
|
||||
|
||||
dependencies {
|
||||
testCompile group: 'junit', name: 'junit', version: '4.12'
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
|
||||
}
|
||||
compileKotlin {
|
||||
kotlinOptions {
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ repositories {
|
||||
|
||||
dependencies {
|
||||
testCompile group: 'junit', name: 'junit', version: '4.12'
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
|
||||
}
|
||||
compileKotlin {
|
||||
kotlinOptions {
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ repositories {
|
||||
|
||||
dependencies {
|
||||
testCompile("junit", "junit", "4.12")
|
||||
compile(kotlin("stdlib-jdk8"))
|
||||
implementation(kotlin("stdlib-jdk8"))
|
||||
}
|
||||
|
||||
configure<JavaPluginConvention> {
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||
}
|
||||
compileKotlin {
|
||||
kotlinOptions {
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
|
||||
}
|
||||
compileKotlin {
|
||||
kotlinOptions {
|
||||
|
||||
+1
-1
@@ -23,5 +23,5 @@ repositories {
|
||||
|
||||
dependencies {
|
||||
testCompile group: 'junit', name: 'junit', version: '4.12'
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
}
|
||||
|
||||
+1
-1
@@ -14,5 +14,5 @@ repositories {
|
||||
|
||||
dependencies {
|
||||
testCompile group: 'junit', name: 'junit', version: '4.12'
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user