166 lines
		
	
	
	
		
			5 KiB
		
	
	
	
		
			Kotlin
		
	
	
	
	
	
			
		
		
	
	
			166 lines
		
	
	
	
		
			5 KiB
		
	
	
	
		
			Kotlin
		
	
	
	
	
	
plugins {
 | 
						|
    id("com.android.application")
 | 
						|
    id("org.jetbrains.kotlin.android")
 | 
						|
    id("com.google.dagger.hilt.android")
 | 
						|
    id("com.google.gms.google-services")
 | 
						|
    id("com.google.firebase.crashlytics")
 | 
						|
    id("org.jetbrains.kotlin.kapt")
 | 
						|
    id("com.google.devtools.ksp")
 | 
						|
}
 | 
						|
 | 
						|
android {
 | 
						|
    namespace = "com.pixelized.rplexicon"
 | 
						|
    compileSdk = 34
 | 
						|
 | 
						|
    signingConfigs {
 | 
						|
        getByName("debug") {
 | 
						|
            storeFile = file("../debug.keystore")
 | 
						|
            storePassword = "123456"
 | 
						|
            keyAlias = "debug"
 | 
						|
            keyPassword = "123456"
 | 
						|
        }
 | 
						|
        create("pixelized") {
 | 
						|
            storeFile = (project.properties["PIXELIZED_RELEASE_STORE_FILE"] as? String)?.let { file(it) }
 | 
						|
            storePassword = project.properties["PIXELIZED_RELEASE_STORE_PASSWORD"] as? String
 | 
						|
            keyAlias = project.properties["PIXELIZED_RELEASE_KEY_ALIAS"] as? String
 | 
						|
            keyPassword = project.properties["PIXELIZED_RELEASE_KEY_PASSWORD"] as? String
 | 
						|
        }
 | 
						|
    }
 | 
						|
 | 
						|
    defaultConfig {
 | 
						|
        applicationId = "com.pixelized.rplexicon"
 | 
						|
        minSdk = 26
 | 
						|
        targetSdk = 34
 | 
						|
        versionName = "0.8.2"
 | 
						|
 | 
						|
        testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
 | 
						|
        vectorDrawables {
 | 
						|
            useSupportLibrary = true
 | 
						|
        }
 | 
						|
    }
 | 
						|
 | 
						|
    buildTypes {
 | 
						|
        debug {
 | 
						|
            applicationIdSuffix = ".dev"
 | 
						|
            isDebuggable = true
 | 
						|
            isMinifyEnabled = false
 | 
						|
            signingConfig = signingConfigs.getByName("debug")
 | 
						|
            defaultConfig {
 | 
						|
                versionCode = 1
 | 
						|
            }
 | 
						|
            proguardFiles(
 | 
						|
                getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
 | 
						|
            )
 | 
						|
        }
 | 
						|
        release {
 | 
						|
            isDebuggable = false
 | 
						|
            isMinifyEnabled = true
 | 
						|
            signingConfig = signingConfigs.getByName("pixelized")
 | 
						|
            defaultConfig {
 | 
						|
                versionCode = gitBuildNumber
 | 
						|
            }
 | 
						|
            proguardFiles(
 | 
						|
                getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
 | 
						|
            )
 | 
						|
        }
 | 
						|
    }
 | 
						|
 | 
						|
    compileOptions {
 | 
						|
        sourceCompatibility = JavaVersion.VERSION_17
 | 
						|
        targetCompatibility = JavaVersion.VERSION_17
 | 
						|
    }
 | 
						|
 | 
						|
    kotlinOptions {
 | 
						|
        jvmTarget = "17"
 | 
						|
    }
 | 
						|
 | 
						|
    buildFeatures {
 | 
						|
        compose = true
 | 
						|
        buildConfig = true
 | 
						|
    }
 | 
						|
 | 
						|
    composeOptions {
 | 
						|
        kotlinCompilerExtensionVersion = "1.5.3"
 | 
						|
    }
 | 
						|
 | 
						|
    packaging {
 | 
						|
        resources {
 | 
						|
            excludes += "/META-INF/{AL2.0,LGPL2.1}"
 | 
						|
        }
 | 
						|
    }
 | 
						|
 | 
						|
    lint {
 | 
						|
        lintConfig = file("$rootDir/lint-config.xml")
 | 
						|
    }
 | 
						|
}
 | 
						|
 | 
						|
dependencies {
 | 
						|
    implementation("androidx.core:core-ktx:1.12.0")
 | 
						|
    implementation("androidx.activity:activity-compose:1.8.0")
 | 
						|
 | 
						|
    // Compose
 | 
						|
    implementation("androidx.compose.ui:ui:1.5.4")
 | 
						|
    implementation("androidx.compose.ui:ui-util:1.5.4")
 | 
						|
    implementation("androidx.compose.ui:ui-graphics:1.5.4")
 | 
						|
    implementation("androidx.compose.ui:ui-tooling-preview:1.5.4")
 | 
						|
    implementation("androidx.compose.material:material:1.5.4")
 | 
						|
    implementation("androidx.compose.material3:material3:1.1.2")
 | 
						|
    debugImplementation("androidx.compose.ui:ui-tooling:1.5.4")
 | 
						|
 | 
						|
    implementation("androidx.constraintlayout:constraintlayout-compose:1.0.1")
 | 
						|
 | 
						|
    // Navigation
 | 
						|
    implementation("androidx.navigation:navigation-compose:2.7.5")
 | 
						|
 | 
						|
    // Accompanist
 | 
						|
    implementation("com.google.accompanist:accompanist-placeholder:0.30.1")
 | 
						|
 | 
						|
    // Splash Screen support prior to Android 12
 | 
						|
    implementation("androidx.core:core-splashscreen:1.0.1")
 | 
						|
 | 
						|
    // Google service
 | 
						|
    implementation("com.google.android.gms:play-services-auth:20.7.0")
 | 
						|
    implementation(
 | 
						|
        dependencyNotation = "com.google.api-client:google-api-client-android:1.23.0",
 | 
						|
        dependencyConfiguration = { exclude("org.apache.httpcomponents") },
 | 
						|
    )
 | 
						|
    implementation(
 | 
						|
        dependencyNotation = "com.google.apis:google-api-services-sheets:v4-rev20220927-2.0.0",
 | 
						|
        dependencyConfiguration = { exclude("org.apache.httpcomponents") },
 | 
						|
    )
 | 
						|
 | 
						|
    // Import the BoM for the Firebase platform
 | 
						|
    implementation(platform("com.google.firebase:firebase-bom:32.3.1"))
 | 
						|
    implementation("com.google.firebase:firebase-crashlytics-ktx")
 | 
						|
    implementation("com.google.firebase:firebase-analytics-ktx")
 | 
						|
    implementation("com.google.firebase:firebase-auth-ktx")
 | 
						|
    implementation("com.google.firebase:firebase-database-ktx")
 | 
						|
 | 
						|
    // Hilt: Dependency injection
 | 
						|
    implementation("androidx.hilt:hilt-navigation-compose:1.1.0")
 | 
						|
    implementation("com.google.dagger:hilt-android:2.48")
 | 
						|
    kapt("com.google.dagger:hilt-compiler:2.48")
 | 
						|
 | 
						|
    // Image
 | 
						|
    implementation("io.coil-kt:coil-compose:2.4.0")
 | 
						|
}
 | 
						|
 | 
						|
java {
 | 
						|
    toolchain {
 | 
						|
        languageVersion.set(JavaLanguageVersion.of(17))
 | 
						|
    }
 | 
						|
}
 | 
						|
 | 
						|
kotlin {
 | 
						|
    jvmToolchain(17)
 | 
						|
}
 | 
						|
 | 
						|
val gitBuildNumber: Int
 | 
						|
    get() {
 | 
						|
        val stdout = org.apache.commons.io.output.ByteArrayOutputStream()
 | 
						|
        rootProject.exec {
 | 
						|
            commandLine("git", "rev-list", "--count", "HEAD")
 | 
						|
            standardOutput = stdout
 | 
						|
        }
 | 
						|
        return stdout.toString().trim().toInt()
 | 
						|
    }
 |