Skip to content

Commit

Permalink
secrets gradle added.
Browse files Browse the repository at this point in the history
  • Loading branch information
merttoptas committed Oct 12, 2023
1 parent cedc3f4 commit e8322d8
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 107 deletions.
9 changes: 5 additions & 4 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ android {
isDebuggable = false
isMinifyEnabled = true
isShrinkResources = true
buildConfigField("String", "BASE_URL", "\"https://fakestoreapi.com/\"")
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
Expand All @@ -43,7 +42,6 @@ android {
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
buildConfigField("String", "BASE_URL", "\"https://fakestoreapi.com/\"")
}
}

Expand Down Expand Up @@ -72,8 +70,10 @@ dependencies {
implementation(libs.androidx.core.splashscreen)
implementation(libs.okhttp.logging.interceptor)

implementation(project(":core:common"))
implementation(project(":core:designsystem"))
implementation(projects.core.common)
implementation(projects.core.designsystem)
implementation(projects.core.data)
implementation(projects.core.domain)

testImplementation(libs.junit4)

Expand All @@ -94,6 +94,7 @@ dependencies {
debugImplementation(libs.chucker)
releaseImplementation(libs.chucker.no.op)

implementation(libs.androidx.compose.runtime)
implementation(libs.androidx.lifecycle.runtime.ktx)
implementation(libs.androidx.lifecycle.runtimeCompose)
implementation(libs.compose.state.events)
Expand Down

This file was deleted.

This file was deleted.

2 changes: 2 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ plugins {
alias(libs.plugins.firebase.crashlytics) apply false
alias(libs.plugins.ksp) apply false
alias(libs.plugins.com.android.library) apply false
alias(libs.plugins.secrets) apply false

}

apply(from = "buildscripts/githooks.gradle")
Expand Down
7 changes: 6 additions & 1 deletion core/data/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ plugins {
id("samplecomposeanroid.android.library")
id("samplecomposeanroid.android.hilt")
id("kotlinx-serialization")
id("com.google.android.libraries.mapsplatform.secrets-gradle-plugin")

}

android {
Expand All @@ -14,6 +16,10 @@ android {
}
}

secrets {
defaultPropertiesFileName = "secrets.defaults.properties"
}

dependencies {
implementation(libs.androidx.core.ktx)
implementation(libs.kotlinx.coroutines.android)
Expand All @@ -27,5 +33,4 @@ dependencies {
debugImplementation(libs.chucker)
releaseImplementation(libs.chucker.no.op)
implementation(projects.core.common)
implementation(projects.core.designsystem)
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import android.content.Context
import com.chuckerteam.chucker.api.ChuckerCollector
import com.chuckerteam.chucker.api.ChuckerInterceptor
import com.chuckerteam.chucker.api.RetentionManager
import com.loodos.samplecomposeandroid.BuildConfig
import com.loodos.data.remote.api.AuthenticationService
import com.loodos.samplecomposeanroid.core.data.BuildConfig
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
Expand Down Expand Up @@ -33,7 +33,7 @@ object RemoteDataModule {
okHttpClient: OkHttpClient,
gsonConverterFactory: GsonConverterFactory,
): Retrofit {
return Retrofit.Builder().baseUrl(BuildConfig.BUILD_TYPE)
return Retrofit.Builder().baseUrl(BuildConfig.BACKEND_URL)
.addConverterFactory(gsonConverterFactory)
.client(okHttpClient).build()
}
Expand Down
5 changes: 3 additions & 2 deletions core/domain/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import org.jetbrains.kotlin.kapt3.base.Kapt.kapt

@Suppress("DSL_SCOPE_VIOLATION") // TODO: Remove once KTIJ-19369 is fixed
plugins {
id("samplecomposeanroid.android.library")
Expand All @@ -16,6 +14,9 @@ dependencies {
implementation(libs.hilt.android)
implementation(libs.kotlinx.coroutines.android)
implementation(libs.kotlinx.datetime)
api(libs.androidx.compose.runtime)
api(libs.androidx.compose.runtime.livedata)

implementation(projects.core.data)
implementation(projects.core.common)

Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ android.enableJetifier=true
android.defaults.buildfeatures.resvalues=false
android.defaults.buildfeatures.shaders=false
android.features.buildConfig = true
android.suppressUnsupportedCompileSdk=34
android.defaults.buildfeatures.buildconfig=true



Expand Down
28 changes: 15 additions & 13 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@
accompanist = "0.30.1"
appCompat = "1.6.1"
androidDesugarJdkLibs = "2.0.3"
androidGradlePlugin = "8.0.0"
androidxActivity = "1.7.1"
androidGradlePlugin = "8.0.2"
androidxActivity = "1.8.0"
navigationCompose = "2.7.4"
fragmentKtx = "1.6.1"
okhttp = "4.10.0"
kotlinxSerializationJson = "1.5.1"
kotlinxCoroutines = "1.6.4"
androidxComposeBom = "2023.05.01"
androidxCoreSplashscreen = "1.0.0"
androidxComposeBom = "2023.10.00"
androidxCoreSplashscreen = "1.0.1"
androidxDataStore = "1.0.0"
androidxMetrics = "1.0.0-alpha03"
androidxMetrics = "1.0.0-alpha04"
androidxEspresso = "3.5.0"
androidxHiltNavigationCompose = "1.0.0"
androidxLifecycle = "2.6.0-alpha05"
androidxLifecycle = "2.6.2"
androidxTest = "1.1.5"
firebaseBom = "31.2.0"
firebaseCrashlyticsPlugin = "2.9.4"
gmsPlugin = "4.3.14"
kotlin = "1.8.21"
gmsPlugin = "4.4.0"
composeStateEvents = "1.2.3"
kotlinxDatetime = "0.4.0"
ksp = "1.8.21-1.0.11"
Expand All @@ -33,21 +33,22 @@ detektGradlePlugin = "1.22.0"
espresso = "3.5.1"
gradleVersionsPlugin = "0.46.0"
hiltNavigationCompose = "1.0.0"
androidxNavigation = "2.5.3"
hilt = "2.46.1"
androidxNavigation = "2.7.4"
hilt = "2.47"
junit = "4.13.2"
kotlinter = "3.14.0"
ktxCore = "1.10.1"
ktxCore = "1.12.0"
leakCanary = "2.10"
lifecycle = "2.6.1"
material = "1.9.0"
lifecycle = "2.6.2"
material = "1.10.0"
minSdk = "21"
targetSdk = "34"
moshi = "1.15.0"
retrofit = "2.9.0"
room = "2.5.1"
chucker = "3.5.2"
firebase-pref = "1.4.1"
secrets = "2.0.1"


[libraries]
Expand Down Expand Up @@ -131,4 +132,5 @@ com-android-test = { id = "com.android.test", version.ref = "com-android-test" }
gradle-versions = { id = "com.github.ben-manes.versions", version.ref = "gradleVersionsPlugin" }
detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detektGradlePlugin" }
kotlinter = { id = "org.jmailen.kotlinter", version.ref = "kotlinter" }
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
secrets = { id = "com.google.android.libraries.mapsplatform.secrets-gradle-plugin", version.ref = "secrets" }
4 changes: 4 additions & 0 deletions secrets.defaults.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## This file provides default values to modules using the secrets-gradle-plugin. It is necessary
# because the secrets properties file is not under source control so CI builds will fail without
# default values.
BACKEND_URL="https://fakestoreapi.com/"

0 comments on commit e8322d8

Please sign in to comment.