-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set up Maven publishing rules. (#706)
Setting up to do a new release, this adds build system rules so we can release the following libraries - `identity` - `identity-mdoc` - `identity-doctypes` - `identity-android` - `identity-android-legacy` - `processor-annotations` This change also ports `identity-doctypes` to Kotlin Multiplatform. Test: ./gradlew check Test: ./gradlew connectedCheck Test: Manully tested with artifacts from "./gradlew publishToMavenLocal" in out-of-tree version of samples/simple-verifier. Signed-off-by: David Zeuthen <[email protected]>
- Loading branch information
Showing
14 changed files
with
278 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,84 @@ | ||
plugins { | ||
id("java-library") | ||
id("org.jetbrains.kotlin.jvm") | ||
alias(libs.plugins.kotlinMultiplatform) | ||
id("maven-publish") | ||
} | ||
|
||
val projectVersionCode: Int by rootProject.extra | ||
val projectVersionName: String by rootProject.extra | ||
|
||
kotlin { | ||
jvmToolchain(17) | ||
} | ||
|
||
java { | ||
sourceCompatibility = JavaVersion.VERSION_17 | ||
targetCompatibility = JavaVersion.VERSION_17 | ||
jvm() | ||
|
||
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(":identity")) | ||
implementation(libs.kotlinx.datetime) | ||
implementation(libs.kotlinx.io.bytestring) | ||
} | ||
} | ||
|
||
val commonTest by getting { | ||
dependencies { | ||
implementation(libs.kotlin.test) | ||
implementation(libs.kotlinx.coroutine.test) | ||
} | ||
} | ||
|
||
val jvmMain by getting { | ||
dependencies { | ||
implementation(libs.bouncy.castle.bcprov) | ||
implementation(libs.bouncy.castle.bcpkix) | ||
implementation(libs.tink) | ||
} | ||
} | ||
|
||
val jvmTest by getting { | ||
dependencies { | ||
implementation(libs.bouncy.castle.bcprov) | ||
implementation(libs.bouncy.castle.bcpkix) | ||
} | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation(project(":identity")) | ||
implementation(libs.kotlinx.datetime) | ||
testImplementation(libs.junit) | ||
group = "com.android.identity" | ||
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" | ||
} | ||
} | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.