fix(gradle): add corporate proxy SSL truststore + Compose deps for kotlin-platform-sdk
- switch-network.sh: set GRADLE_OPTS with custom truststore when NETWORK=corp - kotlin-platform-sdk: add repos to settings.gradle.kts for composite builds - kotlin-platform-sdk: add Compose plugin + BOM + UI/Material3/Foundation deps - kotlin-platform-sdk: use kotlinOptions (stable) instead of compilerOptions
This commit is contained in:
parent
96866dcaf6
commit
3ef40028ab
@ -2,6 +2,7 @@ plugins {
|
||||
id("com.android.library") version "8.7.3"
|
||||
id("org.jetbrains.kotlin.android") version "2.1.0"
|
||||
id("org.jetbrains.kotlin.plugin.serialization") version "2.1.0"
|
||||
id("org.jetbrains.kotlin.plugin.compose") version "2.1.0"
|
||||
}
|
||||
|
||||
android {
|
||||
@ -19,8 +20,12 @@ android {
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
|
||||
compilerOptions {
|
||||
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17)
|
||||
kotlinOptions {
|
||||
jvmTarget = "17"
|
||||
}
|
||||
|
||||
buildFeatures {
|
||||
compose = true
|
||||
}
|
||||
}
|
||||
|
||||
@ -38,6 +43,12 @@ dependencies {
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.9.0")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.9.0")
|
||||
|
||||
// Compose UI (for SurveyUI, InAppMessageUI, BroadcastUI)
|
||||
implementation(platform("androidx.compose:compose-bom:2024.12.01"))
|
||||
implementation("androidx.compose.ui:ui")
|
||||
implementation("androidx.compose.material3:material3")
|
||||
implementation("androidx.compose.foundation:foundation")
|
||||
|
||||
// Android
|
||||
implementation("androidx.security:security-crypto:1.0.0")
|
||||
implementation("androidx.biometric:biometric:1.1.0")
|
||||
|
||||
@ -1 +1,16 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
}
|
||||
|
||||
dependencyResolutionManagement {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = "kotlin-platform-sdk"
|
||||
|
||||
@ -20,6 +20,8 @@
|
||||
_CORP_PROXY="http://cso.proxy.att.com:8080/"
|
||||
_CORP_NPM_REGISTRY="https://jfrog-pkg-proxy.it.att.com/artifactory/api/npm/att-npm-proxy-group/"
|
||||
|
||||
_GRADLE_TRUSTSTORE="$HOME/.gradle/ssl/gradle-cacerts.jks"
|
||||
|
||||
if [ "${NETWORK:-home}" = "corp" ]; then
|
||||
# ── Corporate proxy ──
|
||||
export http_proxy="$_CORP_PROXY"
|
||||
@ -32,14 +34,20 @@ if [ "${NETWORK:-home}" = "corp" ]; then
|
||||
export NPM_CONFIG_STRICT_SSL="false"
|
||||
export PIP_TRUSTED_HOST="pypi.org files.pythonhosted.org"
|
||||
export NODE_TLS_REJECT_UNAUTHORIZED="0"
|
||||
# Gradle: trust corporate proxy CA cert (TLS interception by cso.proxy.att.com)
|
||||
if [ -f "$_GRADLE_TRUSTSTORE" ]; then
|
||||
export GRADLE_OPTS="-Djavax.net.ssl.trustStore=$_GRADLE_TRUSTSTORE -Djavax.net.ssl.trustStorePassword=changeit"
|
||||
fi
|
||||
else
|
||||
# ── Home / direct internet ──
|
||||
unset http_proxy https_proxy HTTP_PROXY HTTPS_PROXY 2>/dev/null
|
||||
unset NPM_CONFIG_REGISTRY NPM_CONFIG_PROXY NPM_CONFIG_HTTPS_PROXY 2>/dev/null
|
||||
unset NPM_CONFIG_STRICT_SSL NODE_TLS_REJECT_UNAUTHORIZED 2>/dev/null
|
||||
unset PIP_TRUSTED_HOST 2>/dev/null
|
||||
unset PIP_TRUSTED_HOST GRADLE_OPTS 2>/dev/null
|
||||
fi
|
||||
|
||||
unset _GRADLE_TRUSTSTORE
|
||||
|
||||
# Quick status on new shell (only if interactive)
|
||||
if [[ $- == *i* ]]; then
|
||||
if [ "${NETWORK:-home}" = "corp" ]; then
|
||||
|
||||
Loading…
Reference in New Issue
Block a user