Skip to content

Commit

Permalink
Gradle adjustements (#60)
Browse files Browse the repository at this point in the history
* Many gradle adjustements based on dependency-analysis plugin

* Gradle api/impl cleanup

* Setup linter with serif report

* Fix lint errors
  • Loading branch information
jakoss authored Feb 14, 2023
1 parent 252a8c2 commit 7e03f1f
Show file tree
Hide file tree
Showing 18 changed files with 773 additions and 773 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,15 @@ jobs:
uses: gradle/gradle-build-action@v2
id: gradle
with:
arguments: lintKotlin :app:assembleDebug :app:lintDebug --stacktrace # run tests here
arguments: lintKotlin lintDebug :app:assembleDebug --stacktrace # run tests here
if: steps.commit_formatted_code.outputs.pushed == 'false'

- uses: github/codeql-action/upload-sarif@v2
if: steps.commit_formatted_code.outputs.pushed == 'false' && success() || failure()
with:
sarif_file: app/build/reports/lint-results-debug.sarif
category: lint

actionlint:
runs-on: ubuntu-latest
steps:
Expand All @@ -78,7 +84,6 @@ jobs:
with:
github_token: ${{ secrets.github_token }}
detekt_config: ./config/detekt/detekt.yml
detekt_plugins: ./config/detekt/plugins/detekt-rules-compose-1.2.2.jar
reviewdog_filter: file # always analyse whole file that was added/modified

modulecheck:
Expand Down
8 changes: 7 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ android {
buildFeatures {
buildConfig = true
}

lint {
checkDependencies true
sarifReport true
}
}

kapt {
Expand All @@ -59,7 +64,8 @@ dependencies {
implementation libs.androidx.coordinatorlayour
implementation libs.fragNav

implementation libs.bundles.networking
implementation libs.orbitmvi.viewmodel
implementation libs.material

internalImplementation libs.bundles.pluto
}
5 changes: 0 additions & 5 deletions build-logic/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,5 @@ plugins {
}

dependencies {
implementation libs.kotlin.android.plugin
implementation libs.android.plugin
implementation libs.whetstone.plugin
implementation libs.androidCacheFix
implementation libs.kotlinx.serialization.plugin
implementation libs.detekt.plugin
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ android {
}
}

kotlin {
jvmToolchain(11)
}

anvil {
generateDaggerFactories = true
}
Expand All @@ -67,7 +71,7 @@ dependencies {

implementation libs.coroutines.lib

implementation libs.dagger.core
api libs.dagger.core

implementation libs.bundles.androidx.core
implementation libs.timber
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ android {
if (findProperty("enableComposeCompilerReports") == "true") {
kotlinOptions {
freeCompilerArgs += [
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=" +
buildDir.absolutePath + "/compose_metrics",
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=" +
buildDir.absolutePath + "/compose_metrics"
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=" +
buildDir.absolutePath + "/compose_metrics",
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=" +
buildDir.absolutePath + "/compose_metrics"
]
}
}
Expand All @@ -32,7 +32,9 @@ dependencies {

implementation libs.androidx.activity.compose

implementation libs.bundles.compose.ui.core
api libs.bundles.compose.ui.core

lintChecks libs.compose.linter

androidTestImplementation composeBom
androidTestImplementation libs.bundles.androidx.test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ android {
}

dependencies {
api projects.core.infrastructure
implementation projects.core.infrastructure
api projects.core.navigation
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ plugins {
}

dependencies {
implementation libs.kmapper.library
compileOnly libs.kmapper.library
ksp libs.kmapper.compiler
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ plugins {
dependencies {
api projects.core.networking

implementation libs.retrofit.core
implementation libs.kotlinx.serialization.json
api libs.retrofit.core
api libs.kotlinx.serialization.json
}
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ plugins {
alias libs.plugins.benManesVersions
alias libs.plugins.gradleDoctor
alias libs.plugins.moduleCheck
alias libs.plugins.dependencyAnalysis
}

moduleCheck {
Expand Down
Loading

0 comments on commit 7e03f1f

Please sign in to comment.