Skip to content

Commit

Permalink
cleaning (#104)
Browse files Browse the repository at this point in the history
* cleaning

* cleaning
  • Loading branch information
Grigoriym authored Apr 27, 2024
1 parent b533182 commit 09bcf99
Show file tree
Hide file tree
Showing 32 changed files with 65 additions and 261 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
distribution: 'adopt'

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v3
uses: gradle/actions/wrapper-validation@v3

- name: Setup Gradle Cache
uses: actions/cache@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/code_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
distribution: 'adopt'

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v3
uses: gradle/actions/wrapper-validation@v3

- name: Decode google-services.json
run: echo "$GOOGLE_SERVICES_JSON" | base64 --decode > app/google-services.json
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
distribution: 'adopt'

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v3
uses: gradle/actions/wrapper-validation@v3

- name: Setup Gradle Cache
uses: actions/cache@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
distribution: 'adopt'

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v3
uses: gradle/actions/wrapper-validation@v3

- name: Decode google-services.json
run: echo "$GOOGLE_SERVICES_JSON" | base64 --decode > app/google-services.json
Expand Down
6 changes: 0 additions & 6 deletions analytics-api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@ plugins {

android {
namespace = "com.grappim.hateitorrateit.analyticsapi"

buildTypes {
release {
isMinifyEnabled = true
}
}
}

dependencies {
Expand Down
6 changes: 0 additions & 6 deletions analytics-impl/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@ plugins {

android {
namespace = "com.grappim.hateitorrateit.analyticsimpl"

buildTypes {
release {
isMinifyEnabled = true
}
}
}

dependencies {
Expand Down
26 changes: 16 additions & 10 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ android {

defaultConfig {
applicationId = "com.grappim.hateitorrateit"
testApplicationId = "com.grappim.hateitorrateit.tests"

minSdk = libs.versions.minSdk.get().toInt()
targetSdk = libs.versions.targetSdk.get().toInt()
versionCode = 6
Expand Down Expand Up @@ -100,6 +102,10 @@ android {
}
bundle {
language {
// Specifies that the app bundle should not support
// configuration APKs for language resources. These
// resources are instead packaged with each base and
// dynamic feature APK.
enableSplit = false
}
}
Expand All @@ -125,17 +131,20 @@ dependencies {
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.startup)
implementation(libs.androidx.activity.compose)

implementation(libs.androidx.navigation.compose)

implementation(libs.timber)

implementation(libs.androidx.hilt.navigation.compose)

implementation(libs.androidx.lifecycle.runtime)
implementation(libs.androidx.viewmodel.compose)
implementation(libs.androidx.runtime.compose)

implementation(libs.androidx.work.runtime)
implementation(libs.androidx.hilt.work)
ksp(libs.androidx.hilt.compiler)

implementation(libs.hilt.android)
ksp(libs.hilt.compiler)

coreLibraryDesugaring(libs.android.desugarJdkLibs)

implementation(platform(libs.androidx.compose.bom))
Expand All @@ -148,12 +157,6 @@ dependencies {
implementation(libs.androidx.compose.material.icons.core)
implementation(libs.androidx.compose.material.icons.extended)

implementation(libs.androidx.lifecycle.runtime)
implementation(libs.androidx.viewmodel.compose)
implementation(libs.androidx.runtime.compose)

implementation(libs.coil)

implementation(platform(libs.firebase.bom))
implementation(libs.firebase.crashlytics)
implementation(libs.firebase.analytics)
Expand All @@ -168,4 +171,7 @@ dependencies {
androidTestImplementation(project(":testing"))

testImplementation(libs.robolectric)

implementation(libs.coil)
implementation(libs.timber)
}
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ class SettingsScreenKtTest {
trackScreenStart = {},
isAnalyticsCollectionEnabled = false,
onAnalyticsToggle = {},
onDarkThemeConfigClicked = {}
onDarkThemeConfigClicked = {},
localeOptions = mutableMapOf()
)
}
2 changes: 1 addition & 1 deletion build-logic/convention/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
`kotlin-dsl`
}

group = "com.google.samples.apps.nowinandroid.buildlogic"
group = "com.grappim.hateitorrateit.buildlogic"

// Configure the build-logic plugins to target JDK 17
// This matches the JDK used to build the project, and is not related to what is running on device.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ internal fun Project.configureAndroidCompose(
val bom = libs.findLibrary("androidx-compose-bom").get()
add("implementation", platform(bom))
add("androidTestImplementation", platform(bom))
// Add ComponentActivity to debug manifest
add("debugImplementation", libs.findLibrary("androidx.compose.ui.testManifest").get())
add("debugImplementation", libs.findLibrary("androidx.compose.ui.tooling").get())
}

testOptions {
Expand Down
25 changes: 11 additions & 14 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@ plugins {
alias(libs.plugins.jacocoAggregationCoverage)
}

allprojects {
tasks.withType<Test> {
testLogging {
exceptionFormat = TestExceptionFormat.FULL
showCauses = true
showExceptions = true
showStackTraces = true
}
}
}

subprojects {
apply {
plugin("io.gitlab.arturbosch.detekt")
Expand Down Expand Up @@ -113,17 +124,3 @@ testAggregation {
exclude(coverageExclusions)
}
}

val runAllUnitTests by tasks.creating {
group = "verification"
description = "Runs all unit tests in all modules."

dependsOn(subprojects.map { it.tasks.withType<Test>() })
}

val runAndroidTests by tasks.creating {
group = "verification"
description = "Runs Android instrumented tests only in :app and data:db modules."

dependsOn(":app:connectedAndroidTest", ":data:db:connectedAndroidTest")
}
10 changes: 0 additions & 10 deletions commons/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,4 @@ plugins {

android {
namespace = "com.grappim.hateitorrateit.commons"

defaultConfig {
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
isMinifyEnabled = true
}
}
}
10 changes: 0 additions & 10 deletions data/cleaner-api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,6 @@ plugins {

android {
namespace = "com.grappim.hateitorrateit.data.cleanerapi"

defaultConfig {
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
isMinifyEnabled = true
}
}
}

dependencies {
Expand Down
10 changes: 0 additions & 10 deletions data/cleaner-impl/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,6 @@ plugins {

android {
namespace = "com.grappim.hateitorrateit.data.cleanerimpl"

defaultConfig {
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
isMinifyEnabled = true
}
}
}

dependencies {
Expand Down
6 changes: 0 additions & 6 deletions data/db/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ android {
arg("room.expandProjection", "true")
}
}

buildTypes {
release {
isMinifyEnabled = true
}
}
buildFeatures {
buildConfig = true
}
Expand Down
10 changes: 0 additions & 10 deletions data/local-datastorage-api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,6 @@ plugins {

android {
namespace = "com.grappim.hateitorrateit.data.localdatastorageapi"

defaultConfig {
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
isMinifyEnabled = true
}
}
}

dependencies {
Expand Down
10 changes: 0 additions & 10 deletions data/local-datastorage-impl/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,6 @@ plugins {

android {
namespace = "com.grappim.hateitorrateit.data.localdatastorageimpl"

defaultConfig {
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
isMinifyEnabled = true
}
}
}

dependencies {
Expand Down
10 changes: 0 additions & 10 deletions data/remote-config-api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,6 @@ plugins {

android {
namespace = "com.grappim.hateitorrateit.data.remoteconfigapi"

defaultConfig {
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
isMinifyEnabled = true
}
}
}

dependencies {
Expand Down
10 changes: 0 additions & 10 deletions data/remote-config-impl/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,6 @@ plugins {

android {
namespace = "com.grappim.hateitorrateit.data.remoteconfigimpl"

defaultConfig {
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
isMinifyEnabled = true
}
}
}

dependencies {
Expand Down
9 changes: 0 additions & 9 deletions data/repo-api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,6 @@ plugins {

android {
namespace = "com.grappim.hateitorrateit.data.repoapi"
defaultConfig {
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
isMinifyEnabled = true
}
}
}

dependencies {
Expand Down
10 changes: 0 additions & 10 deletions data/repo-impl/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,6 @@ plugins {

android {
namespace = "com.grappim.hateitorrateit.data.repoimpl"

defaultConfig {
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
isMinifyEnabled = true
}
}
}

dependencies {
Expand Down
10 changes: 0 additions & 10 deletions data/worker-api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,4 @@ plugins {

android {
namespace = "com.grappim.hateitorrateit.data.workerapi"

defaultConfig {
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
isMinifyEnabled = true
}
}
}
13 changes: 1 addition & 12 deletions data/worker-impl/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,7 @@ android {
namespace = "com.grappim.hateitorrateit.data.workerimpl"

defaultConfig {
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
isMinifyEnabled = true

proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
consumerProguardFiles("consumer-rules.pro")
}
}

Expand Down
1 change: 1 addition & 0 deletions data/worker-impl/consumer-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-dontwarn java.lang.invoke.StringConcatFactory
Loading

0 comments on commit 09bcf99

Please sign in to comment.