Skip to content

Commit

Permalink
Renames Dependencies to ProjectConfiguration
Browse files Browse the repository at this point in the history
  • Loading branch information
Tweener committed Jun 13, 2024
1 parent d78c881 commit 1c0fca7
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 63 deletions.
20 changes: 10 additions & 10 deletions androidApp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ plugins {
}

android {
namespace = Dependencies.Versions.MyProject.Android.namespace
compileSdk = Dependencies.Versions.MyProject.Android.compileSDK
namespace = ProjectConfiguration.MyProject.Android.namespace
compileSdk = ProjectConfiguration.MyProject.Android.compileSDK

defaultConfig {
applicationId = Dependencies.Versions.MyProject.Android.applicationId
minSdk = Dependencies.Versions.MyProject.Android.minSDK
targetSdk = Dependencies.Versions.MyProject.Android.targetSDK
versionCode = Dependencies.Versions.MyProject.Android.versionCode
versionName = Dependencies.Versions.MyProject.versionName
applicationId = ProjectConfiguration.MyProject.Android.applicationId
minSdk = ProjectConfiguration.MyProject.Android.minSDK
targetSdk = ProjectConfiguration.MyProject.Android.targetSDK
versionCode = ProjectConfiguration.MyProject.Android.versionCode
versionName = ProjectConfiguration.MyProject.versionName
}

buildFeatures {
Expand Down Expand Up @@ -48,14 +48,14 @@ android {
}

compileOptions {
sourceCompatibility = Dependencies.Versions.Compiler.javaCompatibility
targetCompatibility = Dependencies.Versions.Compiler.javaCompatibility
sourceCompatibility = ProjectConfiguration.Compiler.javaCompatibility
targetCompatibility = ProjectConfiguration.Compiler.javaCompatibility

isCoreLibraryDesugaringEnabled = true
}

kotlinOptions {
jvmTarget = Dependencies.Versions.Compiler.jvmTarget
jvmTarget = ProjectConfiguration.Compiler.jvmTarget
}
}

Expand Down
32 changes: 0 additions & 32 deletions buildSrc/src/main/kotlin/Dependencies.kt

This file was deleted.

29 changes: 29 additions & 0 deletions buildSrc/src/main/kotlin/ProjectConfiguration.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import org.gradle.api.JavaVersion

/**
* @author Vivien Mahe
* @since 23/07/2022
*/

object ProjectConfiguration {

// TODO Rename MyProject to your project name
object MyProject {
const val packageName = "com.tweener.changehere" // TODO Change this
const val versionName = "1.0"

object Android {
const val applicationId = packageName
const val namespace = "$packageName.android"
const val compileSDK = 34
const val targetSDK = compileSDK
const val minSDK = 24
const val versionCode = 1
}
}

object Compiler {
const val jvmTarget = "17"
val javaCompatibility = JavaVersion.VERSION_17
}
}
12 changes: 6 additions & 6 deletions shared/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ plugins {
}

android {
namespace = Dependencies.Versions.MyProject.packageName
compileSdk = Dependencies.Versions.MyProject.Android.compileSDK
namespace = ProjectConfiguration.MyProject.packageName
compileSdk = ProjectConfiguration.MyProject.Android.compileSDK

defaultConfig {
minSdk = Dependencies.Versions.MyProject.Android.minSDK
minSdk = ProjectConfiguration.MyProject.Android.minSDK
}

buildFeatures {
compose = true
}

compileOptions {
sourceCompatibility = Dependencies.Versions.Compiler.javaCompatibility
targetCompatibility = Dependencies.Versions.Compiler.javaCompatibility
sourceCompatibility = ProjectConfiguration.Compiler.javaCompatibility
targetCompatibility = ProjectConfiguration.Compiler.javaCompatibility
}
}

Expand Down Expand Up @@ -117,7 +117,7 @@ kotlin {
}

buildkonfig {
packageName = Dependencies.Versions.MyProject.packageName
packageName = ProjectConfiguration.MyProject.packageName

// Release
defaultConfigs {
Expand Down
10 changes: 5 additions & 5 deletions shared/data/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ plugins {
}

android {
namespace = Dependencies.Versions.MyProject.packageName + ".data"
compileSdk = Dependencies.Versions.MyProject.Android.compileSDK
namespace = ProjectConfiguration.MyProject.packageName + ".data"
compileSdk = ProjectConfiguration.MyProject.Android.compileSDK

defaultConfig {
minSdk = Dependencies.Versions.MyProject.Android.minSDK
minSdk = ProjectConfiguration.MyProject.Android.minSDK
}

compileOptions {
sourceCompatibility = Dependencies.Versions.Compiler.javaCompatibility
targetCompatibility = Dependencies.Versions.Compiler.javaCompatibility
sourceCompatibility = ProjectConfiguration.Compiler.javaCompatibility
targetCompatibility = ProjectConfiguration.Compiler.javaCompatibility
}
}

Expand Down
10 changes: 5 additions & 5 deletions shared/domain/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ plugins {
}

android {
namespace = Dependencies.Versions.MyProject.packageName + ".domain"
compileSdk = Dependencies.Versions.MyProject.Android.compileSDK
namespace = ProjectConfiguration.MyProject.packageName + ".domain"
compileSdk = ProjectConfiguration.MyProject.Android.compileSDK

defaultConfig {
minSdk = Dependencies.Versions.MyProject.Android.minSDK
minSdk = ProjectConfiguration.MyProject.Android.minSDK
}

compileOptions {
sourceCompatibility = Dependencies.Versions.Compiler.javaCompatibility
targetCompatibility = Dependencies.Versions.Compiler.javaCompatibility
sourceCompatibility = ProjectConfiguration.Compiler.javaCompatibility
targetCompatibility = ProjectConfiguration.Compiler.javaCompatibility
}
}

Expand Down
10 changes: 5 additions & 5 deletions shared/presentation/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ plugins {
}

android {
namespace = Dependencies.Versions.MyProject.packageName + ".presentation"
compileSdk = Dependencies.Versions.MyProject.Android.compileSDK
namespace = ProjectConfiguration.MyProject.packageName + ".presentation"
compileSdk = ProjectConfiguration.MyProject.Android.compileSDK

defaultConfig {
minSdk = Dependencies.Versions.MyProject.Android.minSDK
minSdk = ProjectConfiguration.MyProject.Android.minSDK
}

compileOptions {
sourceCompatibility = Dependencies.Versions.Compiler.javaCompatibility
targetCompatibility = Dependencies.Versions.Compiler.javaCompatibility
sourceCompatibility = ProjectConfiguration.Compiler.javaCompatibility
targetCompatibility = ProjectConfiguration.Compiler.javaCompatibility
}

packaging {
Expand Down

0 comments on commit 1c0fca7

Please sign in to comment.