Skip to content

Commit

Permalink
Update script to support lintCheck (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
WhosNickDoglio authored Jan 16, 2023
1 parent ce2390c commit 13f7d82
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions expected_build_gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ dependencies {
ksp("com.squareup.moshi:moshi-kotlin-codegen:1.14.0")
implementation("androidx.compose.ui:ui:1.3.2")
lintPublish(project(":my-lints"))
lintCheck(project(":my-lints"))
}

testImplementation(group = "junit", name = "junit", version = "4.12")
Expand Down
2 changes: 1 addition & 1 deletion gradlekotlinconverter.kts
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ fun String.convertCompileToImplementation(): String {
fun String.convertDependencies(): String {

val testKeywords = "testImplementation|androidTestImplementation|debugImplementation|compileOnly|testCompileOnly|runtimeOnly|developmentOnly"
val gradleKeywords = "($testKeywords|implementation|api|annotationProcessor|classpath|kaptTest|kaptAndroidTest|kapt|check|ksp|coreLibraryDesugaring|detektPlugins|lintPublish)".toRegex()
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 )
Expand Down
1 change: 1 addition & 0 deletions test_build_gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ dependencies {
ksp 'com.squareup.moshi:moshi-kotlin-codegen:1.14.0'
implementation "androidx.compose.ui:ui:1.3.2"
lintPublish project(':my-lints')
lintCheck project(':my-lints')
}

testImplementation(group: "junit", name: "junit", version: "4.12")
Expand Down

0 comments on commit 13f7d82

Please sign in to comment.