Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,7 @@ data/src/.DS_Store
data/.DS_Store
core/src/.DS_Store
core/.DS_Store
buildSrc/src/main/kotlin/.DS_Store
buildSrc/src/.DS_Store
buildSrc/src/main/.DS_Store
buildSrc/.DS_Store
84 changes: 43 additions & 41 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ plugins {
id("kotlin-kapt")
id("com.google.dagger.hilt.android")
id("com.google.gms.google-services")
id("org.jetbrains.kotlin.plugin.compose") version "2.0.0" // this version matches your Kotlin version
kotlin("plugin.serialization") version "1.9.22"
id("org.jetbrains.kotlin.plugin.compose") version Dependencies.PluginVersions.KOTLIN
kotlin("plugin.serialization") version Dependencies.PluginVersions.SERIALIZATION
}

android {
namespace = "com.critt.interp"
compileSdk = 34
compileSdk = BuildConfiguration.COMPILE_SDK

defaultConfig {
applicationId = "com.critt.interp"
minSdk = 26
targetSdk = 34
minSdk = BuildConfiguration.MIN_SDK
targetSdk = BuildConfiguration.TARGET_SDK
versionCode = 1
versionName = "1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
Expand All @@ -31,18 +31,23 @@ android {
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = BuildConfiguration.SOURCE_COMPATIBILITY
targetCompatibility = BuildConfiguration.TARGET_COMPATIBILITY
}
kotlinOptions {
jvmTarget = "1.8"
jvmTarget = BuildConfiguration.JVM_TARGET
}
buildFeatures {
viewBinding = true
compose = true
}
}

// Allow references to generated code
kapt {
correctErrorTypes = true
}

dependencies {
//TODO: Dependency management across modules
implementation(project(":data"))
Expand All @@ -51,50 +56,47 @@ dependencies {
implementation(project(":ui_common"))

//firebase
implementation("com.firebaseui:firebase-ui-auth:8.0.0")
implementation("com.google.firebase:firebase-auth-ktx")
implementation(platform("com.google.firebase:firebase-bom:33.8.0"))
implementation(Dependencies.Firebase.AUTH)
implementation(platform(Dependencies.Firebase.BOM))

//firebase UI
implementation(Dependencies.FirebaseUI.FIREBASE_UI)

//timber
implementation("com.jakewharton.timber:timber:5.0.1")
implementation(Dependencies.Timber.TIMBER)

//hilt
kapt("com.google.dagger:hilt-compiler:2.51.1")
kapt("com.google.dagger:hilt-android-compiler:2.51.1")
implementation("com.google.dagger:hilt-android:2.51.1")
kapt(Dependencies.Hilt.COMPILER)
kapt(Dependencies.Hilt.ANDROID_COMPILER)
implementation(Dependencies.Hilt.ANDROID)

//lifecycle (currently using this for Flow.asLiveData())
implementation("androidx.lifecycle:lifecycle-livedata-ktx:2.8.7")

// Optional - Integration with activities
implementation("androidx.activity:activity-compose:1.9.2")
// Optional - Integration with ViewModels
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.8.5")
// Optional - Integration with LiveData
implementation("androidx.compose.runtime:runtime-livedata")
implementation(Dependencies.Lifecycle.LIVEDATA)

//material theme
implementation("com.google.android.material:material:1.12.0")
implementation(Dependencies.Material.MATERIAL)

//compose
val composeBom = platform("androidx.compose:compose-bom:2024.10.01")
implementation(composeBom)
androidTestImplementation(composeBom)
implementation("androidx.compose.material3:material3")
implementation(platform(Dependencies.Compose.BOM))
androidTestImplementation(platform(Dependencies.Compose.BOM))
implementation(Dependencies.Compose.MATERIAL3)

// Android Studio Preview support
implementation("androidx.compose.ui:ui-tooling-preview")
debugImplementation("androidx.compose.ui:ui-tooling")
debugImplementation(Dependencies.Compose.UI_TOOLING_PREVIEW)
debugImplementation(Dependencies.Compose.UI_TOOLING)
// UI Tests
androidTestImplementation("androidx.compose.ui:ui-test-junit4")
debugImplementation("androidx.compose.ui:ui-test-manifest")

testImplementation("junit:junit:4.13.2")
testImplementation("org.junit.jupiter:junit-jupiter:5.8.1")
androidTestImplementation("androidx.test.ext:junit:1.2.1")
androidTestImplementation("androidx.test.espresso:espresso-core:3.6.1")
}
androidTestImplementation(Dependencies.Compose.UI_TEST_JUNIT4)
debugImplementation(Dependencies.Compose.UI_TEST_MANIFEST)
// Optional - Integration with LiveData
implementation(Dependencies.Compose.LIVEDATA)
// Optional - Integration with activities
implementation(Dependencies.Compose.ACTIVITY_COMPOSE)
// Optional - Integration with ViewModels
implementation(Dependencies.Compose.LIFECYCLE_VIEWMODEL_COMPOSE)

// Allow references to generated code
kapt {
correctErrorTypes = true
//testing
testImplementation(Dependencies.Testing.JUNIT)
testImplementation(Dependencies.Testing.JUNIT_JUPITER)
androidTestImplementation(Dependencies.Testing.ANDROIDX_TEST_EXT)
androidTestImplementation(Dependencies.Testing.ANDROIDX_TEST_ESPRESSO)
}
2 changes: 1 addition & 1 deletion app/src/main/res/values-v23/themes.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<resources xmlns:tools="http://schemas.android.com/tools">

<style name="Theme.Trandroidlator" parent="Base.Theme.Trandroidlator">
<style name="Theme.Interp" parent="Base.Theme.Interp">
<!-- Transparent system bars for edge-to-edge. -->
<item name="android:navigationBarColor">@android:color/transparent</item>
<item name="android:statusBarColor">@android:color/transparent</item>
Expand Down
12 changes: 6 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id("com.android.application") version "8.2.0" apply false
id("org.jetbrains.kotlin.android") version "2.0.0" apply false
kotlin("plugin.serialization") version "1.9.22" apply false
id("com.google.dagger.hilt.android") version "2.51.1" apply false
id("com.google.gms.google-services") version "4.4.2" apply false
id("com.android.library") version "8.2.0" apply false
id("com.android.application") version Dependencies.PluginVersions.ANDROID_GRADLE apply false
id("com.android.library") version Dependencies.PluginVersions.ANDROID_GRADLE apply false
id("org.jetbrains.kotlin.android") version Dependencies.PluginVersions.KOTLIN apply false
kotlin("plugin.serialization") version Dependencies.PluginVersions.SERIALIZATION apply false
id("com.google.dagger.hilt.android") version Dependencies.PluginVersions.HILT apply false
id("com.google.gms.google-services") version Dependencies.PluginVersions.GOOGLE_SERVICES apply false
}
8 changes: 8 additions & 0 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
plugins {
`kotlin-dsl`
}

repositories {
mavenCentral()
google()
}
11 changes: 11 additions & 0 deletions buildSrc/src/main/kotlin/BuildConfiguration.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import org.gradle.api.JavaVersion

object BuildConfiguration {
const val COMPILE_SDK = 35
const val MIN_SDK = 26
const val TARGET_SDK = 35

val SOURCE_COMPATIBILITY = JavaVersion.VERSION_20
val TARGET_COMPATIBILITY = JavaVersion.VERSION_20
const val JVM_TARGET = "20"
}
66 changes: 66 additions & 0 deletions buildSrc/src/main/kotlin/Dependencies.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
object Dependencies {
object PluginVersions {
const val KOTLIN = "2.0.0"
const val HILT = "2.51.1"
const val ANDROID_GRADLE = "8.7.3"
const val GOOGLE_SERVICES = "4.4.2"
const val SERIALIZATION = "1.9.22"
}
object Retrofit {
const val RETROFIT = "com.squareup.retrofit2:retrofit:2.9.0"
const val CONVERTER_GSON = "com.squareup.retrofit2:converter-gson:2.9.0"
const val COROUTINES_ADAPTER = "com.jakewharton.retrofit:retrofit2-kotlin-coroutines-adapter:0.9.2"
}
object Timber {
const val TIMBER = "com.jakewharton.timber:timber:5.0.1"
}
object Firebase {
const val BOM = "com.google.firebase:firebase-bom:33.8.0"
const val AUTH = "com.google.firebase:firebase-auth-ktx"
}
object FirebaseUI {
const val FIREBASE_UI = "com.firebaseui:firebase-ui-auth:8.0.0"
}
object Hilt {
const val COMPILER = "com.google.dagger:hilt-compiler:${PluginVersions.HILT}"
const val ANDROID_COMPILER = "com.google.dagger:hilt-android-compiler:${PluginVersions.HILT}"
const val ANDROID = "com.google.dagger:hilt-android:${PluginVersions.HILT}"
}
object Compose {
const val BOM = "androidx.compose:compose-bom:2024.10.01"
const val MATERIAL3 = "androidx.compose.material3:material3"
const val LIVEDATA = "androidx.compose.runtime:runtime-livedata"
const val UI_TOOLING_PREVIEW = "androidx.compose.ui:ui-tooling-preview"
const val UI_TOOLING = "androidx.compose.ui:ui-tooling"
const val UI_TEST_JUNIT4 = "androidx.compose.ui:ui-test-junit4"
const val UI_TEST_MANIFEST = "androidx.compose.ui:ui-test-manifest"

const val ACTIVITY_COMPOSE = "androidx.activity:activity-compose:1.10.0"
const val LIFECYCLE_VIEWMODEL_COMPOSE = "androidx.lifecycle:lifecycle-viewmodel-compose:2.8.7"
}
object Material {
const val MATERIAL = "com.google.android.material:material:1.12.0"
}
object Lifecycle {
//(currently using this for Flow.asLiveData())
const val LIVEDATA = "androidx.lifecycle:lifecycle-livedata-ktx:2.8.7"
}
object Testing {
const val JUNIT = "junit:junit:4.13.2"
const val JUNIT_JUPITER = "org.junit.jupiter:junit-jupiter:5.8.1"
const val ANDROIDX_TEST_EXT = "androidx.test.ext:junit:1.2.1"
const val ANDROIDX_TEST_ESPRESSO = "androidx.test.espresso:espresso-core:3.6.1"
}
object Crypto {
const val CRYPTO_KTX = "androidx.security:security-crypto:1.1.0-alpha06"
}
object SocketIO {
const val SOCKET_IO = "io.socket:socket.io-client:2.1.1"
}

object Serialization {
const val SERIALIZATION = "org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.0"
}


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

android {
namespace = "com.critt.core"
compileSdk = 34
compileSdk = BuildConfiguration.COMPILE_SDK

defaultConfig {
minSdk = 26
minSdk = BuildConfiguration.MIN_SDK
consumerProguardFiles("consumer-rules.pro")
}

Expand All @@ -22,14 +22,16 @@ android {
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = BuildConfiguration.SOURCE_COMPATIBILITY
targetCompatibility = BuildConfiguration.TARGET_COMPATIBILITY
}
kotlinOptions {
jvmTarget = "1.8"
jvmTarget = BuildConfiguration.JVM_TARGET
}
}

dependencies {
testImplementation("junit:junit:4.13.2")
//testing
testImplementation(Dependencies.Testing.JUNIT)
testImplementation(Dependencies.Testing.JUNIT_JUPITER)
}
35 changes: 18 additions & 17 deletions data/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ plugins {

android {
namespace = "com.critt.data"
compileSdk = 34
compileSdk = BuildConfiguration.COMPILE_SDK

defaultConfig {
minSdk = 26
minSdk = BuildConfiguration.MIN_SDK
consumerProguardFiles("consumer-rules.pro")
buildConfigField("String", "API_BASE_URL", "\"${properties["servicePath"] as String}\"")
}
Expand All @@ -31,11 +31,11 @@ android {
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = BuildConfiguration.SOURCE_COMPATIBILITY
targetCompatibility = BuildConfiguration.TARGET_COMPATIBILITY
}
kotlinOptions {
jvmTarget = "1.8"
jvmTarget = BuildConfiguration.JVM_TARGET
}
buildFeatures {
buildConfig = true
Expand All @@ -46,26 +46,27 @@ dependencies {
implementation(project(":domain"))
implementation(project(":core"))

testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.2.1")

implementation("io.socket:socket.io-client:2.1.1") {
implementation(Dependencies.SocketIO.SOCKET_IO) {
exclude(group = "org.json", module = "json")
}

//shared prefs / crypto
implementation("androidx.security:security-crypto-ktx:1.1.0-alpha06")
implementation(Dependencies.Crypto.CRYPTO_KTX)

//timber
implementation("com.jakewharton.timber:timber:5.0.1")
implementation(Dependencies.Timber.TIMBER)

//retrofit
implementation("com.squareup.retrofit2:retrofit:2.9.0")
implementation("com.squareup.retrofit2:converter-gson:2.9.0")
implementation("com.jakewharton.retrofit:retrofit2-kotlin-coroutines-adapter:0.9.2")
implementation(Dependencies.Retrofit.RETROFIT)
implementation(Dependencies.Retrofit.CONVERTER_GSON)
implementation(Dependencies.Retrofit.COROUTINES_ADAPTER)

//hilt
kapt("com.google.dagger:hilt-compiler:2.51.1")
kapt("com.google.dagger:hilt-android-compiler:2.51.1")
implementation("com.google.dagger:hilt-android:2.51.1")
kapt(Dependencies.Hilt.COMPILER)
kapt(Dependencies.Hilt.ANDROID_COMPILER)
implementation(Dependencies.Hilt.ANDROID)

//testing
testImplementation(Dependencies.Testing.JUNIT)
testImplementation(Dependencies.Testing.JUNIT_JUPITER)
}
Loading