diff --git a/expected_build_gradle.kts b/expected_build_gradle.kts index a252ef1..7e15179 100644 --- a/expected_build_gradle.kts +++ b/expected_build_gradle.kts @@ -54,6 +54,8 @@ configurations.classpath { implementation(kotlin("stdlib", KotlinCompilerVersion.VERSION)) implementation(kotlin("stdlib", KotlinCompilerVersion.VERSION)) +releaseImplementation(kotlin("stdlib", KotlinCompilerVersion.VERSION)) +debugImplementation(kotlin("stdlib", KotlinCompilerVersion.VERSION)) classpath(kotlin("gradle-plugin", version = "$kotlin_version")) classpath(kotlin("gradle-plugin", version = "1.3.20")) diff --git a/gradlekotlinconverter.kts b/gradlekotlinconverter.kts old mode 100755 new mode 100644 index ce70eef..408d3b2 --- a/gradlekotlinconverter.kts +++ b/gradlekotlinconverter.kts @@ -251,9 +251,10 @@ fun String.convertCompileToImplementation(): String { // implementation(":epoxy-annotations") fun String.convertDependencies(): String { - val testKeywords = "testImplementation|androidTestImplementation|debugImplementation|compileOnly|testCompileOnly|runtimeOnly|developmentOnly" + val testKeywords = "testImplementation|androidTestImplementation|debugImplementation|releaseImplementation|compileOnly|testCompileOnly|runtimeOnly|developmentOnly" val gradleKeywords = "($testKeywords|implementation|api|annotationProcessor|classpath|kaptTest|kaptAndroidTest|kapt|check|ksp|coreLibraryDesugaring|detektPlugins|lintPublish|lintCheck)".toRegex() + // ignore cases like kapt { correctErrorTypes = true } and apply plugin: ('kotlin-kapt") but pass kapt("...") // ignore keyWord followed by a space and a { or a " and a ) val validKeywords = "(?!$gradleKeywords\\s*(\\{|\"\\)|\\.))$gradleKeywords.*".toRegex() diff --git a/test_build_gradle b/test_build_gradle index 24c8a6c..c9ffdc5 100644 --- a/test_build_gradle +++ b/test_build_gradle @@ -48,6 +48,8 @@ configurations.classpath.exclude group: 'com.android.tools.external.lombok' implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" +releaseImplementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" +debugImplementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.20")