SPB Git

Repository Public

build.gradle.kts 8.8 KB 203 lines kotlin

1/**2 * =============================================================================3 *                  SP BOUCHER | SOFTWARE & RESEARCH4 *             ARTIFICIAL INTELLIGENCE • FINANCE • ENGINEERING5 * =============================================================================6 *7 * PROJECT METADATA8 * -----------------------------------------------------------------------------9 * Project          : Lou-Ka Android10 * File             : app/build.gradle.kts11 * Description      : module de l'application (Compose, KA Maps, Glance),12 *                    signature de la version publiée.13 * Module           : app14 * Repository       : https://git.spboucher.ai/lou-ka-android15 * Project Website  : https://www.lou-ka.com16 * Created          : 2026-11-2917 * Last Modified    : 2026-12-0118 *19 * =============================================================================20 * AUTHOR & PROFESSIONAL AFFILIATION21 * =============================================================================22 *23 * Author           : Simon-Pierre Boucher24 * Position         : Professor of Finance25 * Institution      : Université du Québec en Outaouais (UQO)26 * Department       : Département des sciences administratives27 * Organization     : SP Boucher28 *29 * Website          : https://spboucher.ai30 * Git              : https://git.spboucher.ai31 *32 * =============================================================================33 * OFFICIAL CONTACT DIRECTORY34 * =============================================================================35 *36 * General          : info@spboucher.ai37 * Professional     : contact@spboucher.ai38 * Direct           : simon@spboucher.ai39 * Research         : research@spboucher.ai40 * Development      : dev@spboucher.ai41 * Support          : support@spboucher.ai42 * Security/Admin   : admin@spboucher.ai43 * Notifications    : notifications@spboucher.ai44 *45 * Preferred Contact: dev@spboucher.ai46 *47 * =============================================================================48 * COPYRIGHT & INTELLECTUAL PROPERTY49 * =============================================================================50 *51 * Copyright (c) 202652 * Simon-Pierre Boucher53 *54 * All rights reserved where applicable.55 *56 * This file is governed by the applicable project license,57 * copyright notices, institutional agreements and relevant law.58 *59 * Unless expressly authorized by the applicable license or60 * rights holder, copying, redistribution, sublicensing,61 * publication and commercial exploitation are not permitted.62 *63 * Existing third-party rights and notices remain unaffected.64 *65 * =============================================================================66 * CONFIDENTIALITY & SECURITY67 * =============================================================================68 *69 * Classification   : Public70 * Distribution     : Public repository; use is governed by the project license71 * Security Contact : admin@spboucher.ai72 *73 * Access to this source does not independently grant permission74 * to redistribute or disclose confidential materials.75 *76 * Do not embed credentials, private keys, access tokens,77 * certificates or confidential personal information.78 *79 * =============================================================================80 * LICENSE & MAINTENANCE81 * =============================================================================82 *83 * License          : None specified (no license file in this repository)84 * Maintainer       : Simon-Pierre Boucher85 * Technical Contact: dev@spboucher.ai86 *87 * =============================================================================88 * END OF SP BOUCHER SOURCE HEADER89 * =============================================================================90 */9192import java.util.Properties9394plugins {95    id("com.android.application")96    id("org.jetbrains.kotlin.plugin.compose")97    id("org.jetbrains.kotlin.plugin.serialization")98}99100val keystoreProps = Properties().apply {101    val f = rootProject.file("keystore.properties")102    if (f.exists()) f.inputStream().use { load(it) }103}104105android {106    namespace = "com.spboucher.louka"107    compileSdk { version = release(37) { minorApiLevel = 2 } }108109    defaultConfig {110        applicationId = "com.spboucher.louka"111        minSdk = 26112        targetSdk = 36113        versionCode = 5114        versionName = "3.2.0"115        // adresse de base de l'API : la production. Seules les variantes d'essai (debug, essai) en reçoivent une autre.116        buildConfigField("String", "API_BASE", "\"https://www.lou-ka.com\"")117        // l'extra d'intent LKBaseURL n'est écouté que par les variantes d'essai : la version publiée n'envoie118        // jamais le jeton de session ailleurs qu'à la production119        buildConfigField("boolean", "BASE_OVERRIDE", "false")120        testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"121        // KA Maps fournit arm64-v8a, armeabi-v7a et x86_64 : sans ce filtre, un appareil x86 (32 bits) installerait122        // l'app sans la bibliothèque de la carte123        ndk { abiFilters += listOf("arm64-v8a", "armeabi-v7a", "x86_64") }124    }125    signingConfigs {126        if (keystoreProps.containsKey("storeFile")) {127            create("release") {128                storeFile = file(keystoreProps.getProperty("storeFile"))129                storePassword = keystoreProps.getProperty("storePassword")130                keyAlias = keystoreProps.getProperty("keyAlias")131                keyPassword = keystoreProps.getProperty("keyPassword")132            }133        }134    }135    // préproduction (comptes d'utilisateurs) : `-Plouka.base=https://…` pour en viser une autre136    val essaiBase = (project.findProperty("louka.base") as String?) ?: "https://louka-comptes.51-161-112-61.sslip.io"137    buildTypes {138        debug {139            buildConfigField("String", "API_BASE", "\"$essaiBase\"")140            buildConfigField("boolean", "BASE_OVERRIDE", "true")141        }142        release {143            isMinifyEnabled = true144            isShrinkResources = true145            proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")146            signingConfig = signingConfigs.findByName("release")147        }148        // « essai » : la version publiée (R8, mêmes règles) pointée sur la préproduction, installable à côté de149        // l'app ; signée par la clé de débogage, jamais distribuée150        create("essai") {151            initWith(getByName("release"))152            applicationIdSuffix = ".essai"153            versionNameSuffix = "-essai"154            signingConfig = signingConfigs.getByName("debug")155            buildConfigField("String", "API_BASE", "\"$essaiBase\"")156            buildConfigField("boolean", "BASE_OVERRIDE", "true")157        }158    }159    compileOptions {160        sourceCompatibility = JavaVersion.VERSION_17161        targetCompatibility = JavaVersion.VERSION_17162    }163    buildFeatures { compose = true; buildConfig = true }164    testOptions { unitTests { isReturnDefaultValues = true } }165    androidResources { localeFilters += listOf("fr") }166}167168169dependencies {170    implementation(platform("androidx.compose:compose-bom:2026.11.01"))171    implementation("androidx.compose.ui:ui")172    implementation("androidx.compose.ui:ui-tooling-preview")173    implementation("androidx.compose.material3:material3")174    implementation("androidx.compose.material:material-icons-extended")175    implementation("androidx.activity:activity-compose:1.13.0")176    implementation("androidx.navigation:navigation-compose:2.10.2")177    implementation("androidx.lifecycle:lifecycle-runtime-compose:2.11.1")178    implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.11.1")179    implementation("androidx.work:work-runtime-ktx:2.12.0")180    implementation("androidx.glance:glance-appwidget:1.2.0")181    implementation("androidx.glance:glance-material3:1.2.0")182    implementation("androidx.browser:browser:1.10.0")183    implementation("androidx.core:core-ktx:1.19.1")184    implementation("io.coil-kt.coil3:coil-compose:3.6.3")185    implementation("io.coil-kt.coil3:coil-network-okhttp:3.6.3")186    implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.13.0")187    implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.11.0")188    implementation("com.squareup.okhttp3:okhttp:5.5.1")189    // KA Maps : moteur de carte maison (Rust, Vulkan / OpenGL ES), voir docs/ARCHITECTURE.md « Carte »190    implementation("ai.spboucher:kamaps:0.4.0")191192    testImplementation("junit:junit:4.13.2")193    testImplementation("org.json:json:20250517")194    testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.11.0")195    testImplementation("com.squareup.okhttp3:mockwebserver:5.5.1")196197    // essais sur appareil des écrans de carte (docs/TESTS.md, « Carte KA Maps »)198    androidTestImplementation("androidx.test:runner:1.7.0")199    androidTestImplementation("androidx.test:rules:1.7.0")200    androidTestImplementation("androidx.test.ext:junit:1.3.0")201    androidTestImplementation("androidx.test.uiautomator:uiautomator:2.3.0")202}203
Files main
Menu

Theme