Skip to content

Commit

Permalink
Update script to support lintPublish (#53)
Browse files Browse the repository at this point in the history
Co-authored-by: Nick Doglio <nicholasdo@zillow.com>
  • Loading branch information
WhosNickDoglio and WhosNickDoglio committed Jan 9, 2023
1 parent 105662a commit ce2390c
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 @@ -42,6 +42,7 @@ dependencies {
detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.21.0")
ksp("com.squareup.moshi:moshi-kotlin-codegen:1.14.0")
implementation("androidx.compose.ui:ui:1.3.2")
lintPublish(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)".toRegex()
val gradleKeywords = "($testKeywords|implementation|api|annotationProcessor|classpath|kaptTest|kaptAndroidTest|kapt|check|ksp|coreLibraryDesugaring|detektPlugins|lintPublish)".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 @@ -38,6 +38,7 @@ dependencies {
detektPlugins 'io.gitlab.arturbosch.detekt:detekt-formatting:1.21.0'
ksp 'com.squareup.moshi:moshi-kotlin-codegen:1.14.0'
implementation "androidx.compose.ui:ui:1.3.2"
lintPublish project(':my-lints')
}

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

0 comments on commit ce2390c

Please sign in to comment.