Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ androidx-core-ktx = "1.16.0"
androidx-espresso-core = "3.7.0"
androidx-material = "1.12.0"
androidx-test-junit = "1.3.0"
annotation = "1.9.1"
compose-plugin = "1.8.2"
junit = "4.13.2"
kotlin = "2.2.0"
Expand Down Expand Up @@ -51,6 +52,7 @@ process-phoenix = "3.0.0"
coil = "3.3.0"

[libraries]
androidx-annotation = { module = "androidx.annotation:annotation", version.ref = "annotation" }
androidx-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "uiToolingPreview" }
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref="kotlinx-coroutines" }
Expand Down
1 change: 1 addition & 0 deletions multipaz-directaccess/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
127 changes: 127 additions & 0 deletions multipaz-directaccess/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSetTree

plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.androidLibrary)
id("maven-publish")
}

val projectVersionName: String by rootProject.extra

kotlin {
jvmToolchain(17)

androidTarget {
@OptIn(ExperimentalKotlinGradlePluginApi::class)
instrumentedTestVariant.sourceSetTree.set(KotlinSourceSetTree.test)

@OptIn(ExperimentalKotlinGradlePluginApi::class)
compilerOptions {
jvmTarget.set(JvmTarget.JVM_17)
}

publishLibraryVariants("release")
}

listOf(
iosX64(),
iosArm64(),
iosSimulatorArm64()
).forEach {
val platform = when (it.name) {
"iosX64" -> "iphonesimulator"
"iosArm64" -> "iphoneos"
"iosSimulatorArm64" -> "iphonesimulator"
else -> error("Unsupported target ${it.name}")
}
it.binaries.all {
linkerOpts(
"-L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/${platform}/",
)
}
}

sourceSets {
val commonMain by getting {
dependencies {
implementation(project(":multipaz"))
}
}

val commonTest by getting {
dependencies {
implementation(libs.kotlin.test)
implementation(libs.kotlinx.coroutines.test)
}
}

val androidMain by getting {
dependencies {
implementation(project(":multipaz"))
implementation(libs.androidx.annotation)
implementation(libs.kotlinx.datetime)
implementation(libs.kotlinx.io.bytestring)
implementation(libs.kotlinx.serialization.json)
implementation(libs.bouncy.castle.bcprov)

api(project(":multipaz"))
}
}
}
}

android {
namespace = "org.multipaz.mlkit"
compileSdk = libs.versions.android.compileSdk.get().toInt()

defaultConfig {
minSdk = 26
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
dependencies {
debugImplementation(libs.androidx.ui.tooling.preview)
androidTestImplementation(libs.compose.junit4)
debugImplementation(libs.compose.test.manifest)
}

packaging {
resources {
excludes += listOf("/META-INF/{AL2.0,LGPL2.1}")
excludes += listOf("/META-INF/versions/9/OSGI-INF/MANIFEST.MF")
}
}

publishing {
singleVariant("release") {
withSourcesJar()
}
}
}

group = "org.multipaz"
version = projectVersionName

publishing {
repositories {
maven {
url = uri("${rootProject.rootDir}/repo")
}
}
publications.withType(MavenPublication::class) {
pom {
licenses {
license {
name = "Apache 2.0"
url = "https://opensource.org/licenses/Apache-2.0"
}
}
}
}
}
Loading