Publish Claude Code Binaries / Stage and publish binaries (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-arm64 (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build linux-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build windows-amd64 (push) Canceled after 0s
Sync Tutti Agent Skills / sync (push) Canceled after 0s
Windows Agent Adapters / Test Windows agent adapters (push) Canceled after 0s
Windows Daemon Adapters / Test Windows daemon adapters (push) Canceled after 0s
Publish Tutti App Runtime / Publish runtime catalog (push) Canceled after 0s
109 lines
3.8 KiB
Groovy
109 lines
3.8 KiB
Groovy
apply plugin: "com.android.application"
|
|
apply plugin: "org.jetbrains.kotlin.android"
|
|
apply plugin: "com.facebook.react"
|
|
|
|
react {
|
|
autolinkLibrariesWithApp()
|
|
}
|
|
|
|
def mobileGoAar = file("${rootDir}/app/libs/tutti-mobile-go.aar")
|
|
def releaseSigningEnvironment = [
|
|
keystorePath: System.getenv("TUTTI_ANDROID_RELEASE_KEYSTORE_PATH"),
|
|
keystorePassword: System.getenv("TUTTI_ANDROID_RELEASE_KEYSTORE_PASSWORD"),
|
|
keyAlias: System.getenv("TUTTI_ANDROID_RELEASE_KEY_ALIAS"),
|
|
keyPassword: System.getenv("TUTTI_ANDROID_RELEASE_KEY_PASSWORD"),
|
|
]
|
|
def missingReleaseSigningVariables = releaseSigningEnvironment.findAll { _, value ->
|
|
value == null || value.trim().isEmpty()
|
|
}.keySet()
|
|
def androidVersionCode = (System.getenv("TUTTI_ANDROID_VERSION_CODE") ?: "1").toInteger()
|
|
def androidVersionName = System.getenv("TUTTI_ANDROID_VERSION_NAME") ?: "0.1.0"
|
|
|
|
tasks.register("verifyMobileGoAar") {
|
|
doLast {
|
|
if (!mobileGoAar.isFile()) {
|
|
throw new GradleException(
|
|
"Mobile Go AAR is missing. Run pnpm --filter @tutti-os/mobile android:aar first."
|
|
)
|
|
}
|
|
}
|
|
}
|
|
|
|
tasks.register("verifyReleaseSigningConfiguration") {
|
|
doLast {
|
|
if (!missingReleaseSigningVariables.isEmpty()) {
|
|
def variableNames = [
|
|
keystorePath: "TUTTI_ANDROID_RELEASE_KEYSTORE_PATH",
|
|
keystorePassword: "TUTTI_ANDROID_RELEASE_KEYSTORE_PASSWORD",
|
|
keyAlias: "TUTTI_ANDROID_RELEASE_KEY_ALIAS",
|
|
keyPassword: "TUTTI_ANDROID_RELEASE_KEY_PASSWORD",
|
|
]
|
|
def missingVariables = missingReleaseSigningVariables.collect { variableNames[it] }.sort()
|
|
throw new GradleException(
|
|
"Android release signing is not configured. Missing: ${missingVariables.join(', ')}"
|
|
)
|
|
}
|
|
|
|
def keystoreFile = file(releaseSigningEnvironment.keystorePath)
|
|
if (!keystoreFile.isFile()) {
|
|
throw new GradleException("Android release keystore does not exist: ${keystoreFile}")
|
|
}
|
|
}
|
|
}
|
|
|
|
android {
|
|
ndkVersion rootProject.ext.ndkVersion
|
|
buildToolsVersion rootProject.ext.buildToolsVersion
|
|
compileSdk rootProject.ext.compileSdkVersion
|
|
|
|
namespace "sh.tutti.mobile"
|
|
defaultConfig {
|
|
applicationId "sh.tutti.mobile"
|
|
minSdkVersion rootProject.ext.minSdkVersion
|
|
targetSdkVersion rootProject.ext.targetSdkVersion
|
|
versionCode androidVersionCode
|
|
versionName androidVersionName
|
|
}
|
|
signingConfigs {
|
|
release {
|
|
if (missingReleaseSigningVariables.isEmpty()) {
|
|
storeFile file(releaseSigningEnvironment.keystorePath)
|
|
storePassword releaseSigningEnvironment.keystorePassword
|
|
keyAlias releaseSigningEnvironment.keyAlias
|
|
keyPassword releaseSigningEnvironment.keyPassword
|
|
}
|
|
}
|
|
}
|
|
buildTypes {
|
|
release {
|
|
signingConfig signingConfigs.release
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
|
|
}
|
|
}
|
|
packagingOptions {
|
|
jniLibs {
|
|
useLegacyPackaging = true
|
|
}
|
|
}
|
|
}
|
|
|
|
tasks.named("preBuild").configure {
|
|
dependsOn("verifyMobileGoAar")
|
|
}
|
|
|
|
tasks.matching { task -> task.name == "preReleaseBuild" }.configureEach {
|
|
dependsOn("verifyReleaseSigningConfiguration")
|
|
}
|
|
|
|
dependencies {
|
|
implementation("androidx.browser:browser:1.10.0")
|
|
implementation("androidx.core:core-ktx:1.16.0")
|
|
implementation("androidx.lifecycle:lifecycle-process:2.6.2")
|
|
implementation("com.facebook.react:react-android")
|
|
implementation("com.facebook.react:hermes-android")
|
|
implementation("com.journeyapps:zxing-android-embedded:4.3.0")
|
|
implementation(files(mobileGoAar))
|
|
testImplementation("junit:junit:4.13.2")
|
|
}
|