Skip to content

Commit

Permalink
Only apply lint to published libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
bentrengrove committed Dec 8, 2024
1 parent 4fd5d33 commit 6891537
Show file tree
Hide file tree
Showing 15 changed files with 29 additions and 30 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ captures
.idea/deploymentTargetDropDown.xml
.idea/misc.xml
.idea/androidTestResultsUserPreferences.xml
.idea/deploymentTargetSelector.xml
gradle.xml
*.iml

Expand All @@ -42,3 +43,6 @@ package-list-coil-base
docs-gen
site
*.bak

# Lint reports
lint-report.*
3 changes: 3 additions & 0 deletions .idea/deploymentTargetSelector.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions .idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion adaptive/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ plugins {
alias(libs.plugins.accompanist.android.library)
alias(libs.plugins.accompanist.android.library.compose)
alias(libs.plugins.accompanist.android.library.published)
alias(libs.plugins.accompanist.android.lint)
}

android {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import me.tylerbwong.gradle.metalava.extension.MetalavaExtension
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.kotlin.dsl.apply
import org.gradle.kotlin.dsl.configure

/*
Expand All @@ -23,6 +24,8 @@ class AndroidLibraryPublishedConventionPlugin : Plugin<Project> {
override fun apply(target: Project) {
with(target) {
with(pluginManager) {
apply(AndroidLintConventionPlugin::class)

apply("me.tylerbwong.gradle.metalava")
apply("org.jetbrains.dokka")
apply("com.vanniktech.maven.publish")
Expand Down
1 change: 0 additions & 1 deletion drawablepainter/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ plugins {
alias(libs.plugins.accompanist.android.library)
alias(libs.plugins.accompanist.android.library.compose)
alias(libs.plugins.accompanist.android.library.published)
alias(libs.plugins.accompanist.android.lint)
}

android {
Expand Down
20 changes: 0 additions & 20 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[versions]

compose = "1.7.0"
composeCompiler = "1.5.8"
composeMaterial3 = "1.0.1"
composesnapshot = "-" # a single character = no snapshot

Expand All @@ -15,7 +14,6 @@ lintMinCompose = "30.0.0"
ktlint = "0.45.2"
kotlin = "2.0.20"
coroutines = "1.6.4"
okhttp = "3.12.13"
coil = "1.3.2"

androidlint = "25.3.0"
Expand All @@ -42,40 +40,27 @@ compose-material3-material3 = { module = "androidx.compose.material3:material3",
compose-animation-animation = { module = "androidx.compose.animation:animation", version.ref = "compose" }
compose-gradlePlugin = { module = "org.jetbrains.kotlin:compose-compiler-gradle-plugin", version.ref = "kotlin" }

snapper = "dev.chrisbanes.snapper:snapper:0.2.2"

android-gradlePlugin = { module = "com.android.tools.build:gradle", version.ref = "gradlePlugin" }
gradleMavenPublishPlugin = { module = "com.vanniktech:gradle-maven-publish-plugin", version.ref = "vanniktechPublish" }
metalavaGradle = { module = "me.tylerbwong.gradle.metalava:plugin", version.ref = "metalava" }

glide = "com.github.bumptech.glide:glide:4.12.0"

kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" }
kotlin-stdlibJdk8 = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk8", version.ref = "kotlin" }
kotlin-gradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
kotlin-reflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref = "kotlin" }
kotlin-metadataJvm = "org.jetbrains.kotlinx:kotlinx-metadata-jvm:0.3.0"

kotlin-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutines" }
kotlin-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" }

dokka = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version.ref = "dokka" }

okhttp-okhttp = { module = "com.squareup.okhttp3:okhttp", version.ref = "okhttp" }
okhttp-mockWebServer = { module = "com.squareup.okhttp3:mockwebserver", version.ref = "okhttp" }

coil-coil = { module = "io.coil-kt:coil", version.ref = "coil" }
coil-gif = { module = "io.coil-kt:coil-gif", version.ref = "coil" }
coil-compose = { module = "io.coil-kt:coil-compose", version.ref = "coil" }

androidx-appcompat = "androidx.appcompat:appcompat:1.4.2"
androidx-core = "androidx.core:core-ktx:1.8.0"
androidx-activity-compose = "androidx.activity:activity-compose:1.9.0"
androidx-fragment = "androidx.fragment:fragment-ktx:1.8.1"
androidx-dynamicanimation = "androidx.dynamicanimation:dynamicanimation-ktx:1.0.0-alpha03"
androidx-lifecycle-runtime = "androidx.lifecycle:lifecycle-runtime-ktx:2.6.1"
androidx-lifecycle-viewmodel-compose = "androidx.lifecycle:lifecycle-viewmodel-compose:2.6.1"
androidx-lifecycle-common = "androidx.lifecycle:lifecycle-common-java8:2.6.1"
androidx-window = { module = "androidx.window:window", version.ref = "androidxWindow" }
androidx-window-testing = { module = "androidx.window:window-testing", version.ref = "androidxWindow" }

Expand All @@ -90,9 +75,6 @@ androidx-test-rules = { module = "androidx.test:rules", version.ref = "androidxt
androidx-test-orchestrator = "androidx.test:orchestrator:1.5.0"
androidx-test-uiAutomator = "androidx.test.uiautomator:uiautomator:2.3.0"

androidx-test-espressoCore = "androidx.test.espresso:espresso-core:3.6.1"
androidx-test-espressoWeb = "androidx.test.espresso:espresso-web:3.6.1"

junit = "junit:junit:4.13.2"
truth = "com.google.truth:truth:1.1.3"
robolectric = "org.robolectric:robolectric:4.12.1"
Expand All @@ -105,8 +87,6 @@ android-tools-lint-lint = { module = "com.android.tools.lint:lint", version.ref
android-tools-lint-api = { module = "com.android.tools.lint:lint-api", version.ref = "lintMinCompose" }
android-tools-lint-tests = { module = "com.android.tools.lint:lint-tests", version.ref = "lintMinCompose" }

squareup-mockwebserver = "com.squareup.okhttp3:mockwebserver:4.10.0"

[plugins]
android-application = { id = "com.android.application", version.ref = "gradlePlugin" }
android-kotlin = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
Expand Down
1 change: 0 additions & 1 deletion internal-testutils/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
plugins {
alias(libs.plugins.accompanist.android.library)
alias(libs.plugins.accompanist.android.library.compose)
alias(libs.plugins.accompanist.android.lint)
}

android {
Expand Down
2 changes: 1 addition & 1 deletion internal-testutils/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@

<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application android:theme="@style/Theme.Test" />
<application android:theme="@style/InternalTestutilsTheme.Test" />

</manifest>
2 changes: 1 addition & 1 deletion internal-testutils/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<resources>

<style name="Theme.Test" parent="@android:style/Theme.Material.Light.NoActionBar">
<style name="InternalTestutilsTheme.Test" parent="@android:style/Theme.Material.Light.NoActionBar">
<item name="android:windowAnimationStyle">@null</item>
<item name="android:windowContentOverlay">@null</item>
</style>
Expand Down
1 change: 0 additions & 1 deletion navigation-animation/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ plugins {
alias(libs.plugins.accompanist.android.library)
alias(libs.plugins.accompanist.android.library.compose)
alias(libs.plugins.accompanist.android.library.published)
alias(libs.plugins.accompanist.android.lint)
}

android {
Expand Down
1 change: 0 additions & 1 deletion navigation-material/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ plugins {
alias(libs.plugins.accompanist.android.library)
alias(libs.plugins.accompanist.android.library.compose)
alias(libs.plugins.accompanist.android.library.published)
alias(libs.plugins.accompanist.android.lint)
}

android {
Expand Down
1 change: 0 additions & 1 deletion permissions/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ plugins {
alias(libs.plugins.accompanist.android.library)
alias(libs.plugins.accompanist.android.library.compose)
alias(libs.plugins.accompanist.android.library.published)
alias(libs.plugins.accompanist.android.lint)
}

android {
Expand Down
1 change: 0 additions & 1 deletion systemuicontroller/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ plugins {
alias(libs.plugins.accompanist.android.library)
alias(libs.plugins.accompanist.android.library.compose)
alias(libs.plugins.accompanist.android.library.published)
alias(libs.plugins.accompanist.android.lint)
}

android {
Expand Down
1 change: 0 additions & 1 deletion testharness/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ plugins {
alias(libs.plugins.accompanist.android.library)
alias(libs.plugins.accompanist.android.library.compose)
alias(libs.plugins.accompanist.android.library.published)
alias(libs.plugins.accompanist.android.lint)
}

android {
Expand Down

0 comments on commit 6891537

Please sign in to comment.