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:
saravanakumardb1 2026-03-19 15:13:50 -07:00
parent 96866dcaf6
commit 3ef40028ab
3 changed files with 37 additions and 3 deletions

View File

@ -2,6 +2,7 @@ plugins {
id("com.android.library") version "8.7.3" id("com.android.library") version "8.7.3"
id("org.jetbrains.kotlin.android") version "2.1.0" id("org.jetbrains.kotlin.android") version "2.1.0"
id("org.jetbrains.kotlin.plugin.serialization") 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 { android {
@ -19,8 +20,12 @@ android {
targetCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17
} }
compilerOptions { kotlinOptions {
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17) 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-core:1.9.0")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android: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 // Android
implementation("androidx.security:security-crypto:1.0.0") implementation("androidx.security:security-crypto:1.0.0")
implementation("androidx.biometric:biometric:1.1.0") implementation("androidx.biometric:biometric:1.1.0")

View File

@ -1 +1,16 @@
pluginManagement {
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
dependencyResolutionManagement {
repositories {
google()
mavenCentral()
}
}
rootProject.name = "kotlin-platform-sdk" rootProject.name = "kotlin-platform-sdk"

View File

@ -20,6 +20,8 @@
_CORP_PROXY="http://cso.proxy.att.com:8080/" _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/" _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 if [ "${NETWORK:-home}" = "corp" ]; then
# ── Corporate proxy ── # ── Corporate proxy ──
export http_proxy="$_CORP_PROXY" export http_proxy="$_CORP_PROXY"
@ -32,14 +34,20 @@ if [ "${NETWORK:-home}" = "corp" ]; then
export NPM_CONFIG_STRICT_SSL="false" export NPM_CONFIG_STRICT_SSL="false"
export PIP_TRUSTED_HOST="pypi.org files.pythonhosted.org" export PIP_TRUSTED_HOST="pypi.org files.pythonhosted.org"
export NODE_TLS_REJECT_UNAUTHORIZED="0" 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 else
# ── Home / direct internet ── # ── Home / direct internet ──
unset http_proxy https_proxy HTTP_PROXY HTTPS_PROXY 2>/dev/null 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_REGISTRY NPM_CONFIG_PROXY NPM_CONFIG_HTTPS_PROXY 2>/dev/null
unset NPM_CONFIG_STRICT_SSL NODE_TLS_REJECT_UNAUTHORIZED 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 fi
unset _GRADLE_TRUSTSTORE
# Quick status on new shell (only if interactive) # Quick status on new shell (only if interactive)
if [[ $- == *i* ]]; then if [[ $- == *i* ]]; then
if [ "${NETWORK:-home}" = "corp" ]; then if [ "${NETWORK:-home}" = "corp" ]; then