-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: integrate authenticate-sdk, buildSrc (Deps + Version globals), …
…Protos and basic dependencies from old SDK
- Loading branch information
1 parent
4eeea4c
commit 1b0e6b5
Showing
40 changed files
with
3,854 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
import org.gradle.internal.os.OperatingSystem | ||
import org.jetbrains.dokka.gradle.DokkaTask | ||
import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackOutput.Target | ||
|
||
version = rootProject.version | ||
val currentModuleName: String = "authenticate_sdk" | ||
val os: OperatingSystem = OperatingSystem.current() | ||
|
||
plugins { | ||
kotlin("multiplatform") | ||
id("com.android.library") | ||
id("org.jetbrains.dokka") | ||
} | ||
|
||
kotlin { | ||
android { | ||
publishAllLibraryVariants() | ||
} | ||
jvm { | ||
compilations.all { | ||
kotlinOptions { | ||
jvmTarget = "11" | ||
} | ||
} | ||
testRuns["test"].executionTask.configure { | ||
useJUnitPlatform() | ||
} | ||
} | ||
|
||
js(IR) { | ||
this.moduleName = currentModuleName | ||
this.binaries.library() | ||
this.useCommonJs() | ||
this.compilations["main"].packageJson { | ||
this.version = rootProject.version.toString() | ||
} | ||
this.compilations["test"].packageJson { | ||
this.version = rootProject.version.toString() | ||
} | ||
browser { | ||
this.webpackTask { | ||
this.output.library = currentModuleName | ||
this.output.libraryTarget = Target.VAR | ||
} | ||
this.commonWebpackConfig { | ||
this.cssSupport { | ||
this.enabled = true | ||
} | ||
} | ||
this.testTask { | ||
this.useKarma { | ||
this.useChromeHeadless() | ||
} | ||
} | ||
} | ||
nodejs { | ||
this.testTask { | ||
this.useKarma { | ||
this.useChromeHeadless() | ||
} | ||
} | ||
} | ||
} | ||
|
||
|
||
sourceSets { | ||
val commonMain by getting { | ||
dependencies { | ||
implementation("com.benasher44:uuid:0.3.0") | ||
implementation(project(":core-sdk")) | ||
} | ||
} | ||
val commonTest by getting { | ||
dependencies { | ||
implementation(kotlin("test")) | ||
} | ||
} | ||
val jvmMain by getting | ||
val jvmTest by getting { | ||
dependencies { | ||
implementation("junit:junit:4.13.2") | ||
} | ||
} | ||
val androidMain by getting | ||
val androidTest by getting { | ||
dependencies { | ||
implementation("junit:junit:4.13.2") | ||
} | ||
} | ||
val jsMain by getting | ||
val jsTest by getting | ||
|
||
all { | ||
languageSettings.optIn("kotlin.RequiresOptIn") | ||
} | ||
} | ||
} | ||
|
||
android { | ||
compileSdk = 32 | ||
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml") | ||
defaultConfig { | ||
minSdk = 21 | ||
targetSdk = 32 | ||
} | ||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_11 | ||
targetCompatibility = JavaVersion.VERSION_11 | ||
} | ||
/** | ||
* Because Software Components will not be created automatically for Maven publishing from | ||
* Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android. | ||
* disableAutomaticComponentCreation=true in the `gradle.properties` file or use the new | ||
* publishing DSL. | ||
*/ | ||
publishing { | ||
multipleVariants { | ||
withSourcesJar() | ||
withJavadocJar() | ||
allVariants() | ||
} | ||
} | ||
} | ||
|
||
// Dokka implementation | ||
tasks.withType<DokkaTask> { | ||
moduleName.set(project.name) | ||
moduleVersion.set(rootProject.version.toString()) | ||
description = """ | ||
This is a Kotlin Multiplatform Wallet-SDK Library | ||
""".trimIndent() | ||
dokkaSourceSets { | ||
// TODO: Figure out how to include files to the documentations | ||
named("commonMain") { | ||
includes.from("Module.md", "docs/Module.md") | ||
} | ||
} | ||
} | ||
|
||
// afterEvaluate { | ||
// tasks.withType<AbstractTestTask> { | ||
// testLogging { | ||
// events("passed", "skipped", "failed", "standard_out", "standard_error") | ||
// showExceptions = true | ||
// showStackTraces = true | ||
// } | ||
// } | ||
// } |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest package="io.iohk.prism.authenticate" /> |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
actual fun authenticate(did: String, signature: String, originalText: String):String { | ||
return "hola"; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
actual fun createChallenge(expiration: Int): String { | ||
return "hola"; | ||
} |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
expect fun authenticate(did: String, signature: String, originalText: String):String |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
expect fun createChallenge(expiration: Int): String |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
@JsExport | ||
actual fun authenticate(did: String, signature: String, originalText: String):String { | ||
return "hola"; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
@JsExport | ||
actual fun createChallenge(expiration: Int): String { | ||
return "hola"; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
actual fun authenticate(did: String, signature: String, originalText: String):String { | ||
return "hola"; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
actual fun createChallenge(expiration: Int): String { | ||
return "hola"; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import org.gradle.kotlin.dsl.`kotlin-dsl` | ||
|
||
plugins { | ||
`kotlin-dsl` | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} |
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
object Deps { | ||
const val kotlinSerializationJson = "org.jetbrains.kotlinx:kotlinx-serialization-json:${Versions.kotlinSerializationJson}" | ||
const val kotlinBignum = "com.ionspin.kotlin:bignum:${Versions.kotlinBignum}" | ||
const val kotlinCoroutines = "org.jetbrains.kotlinx:kotlinx-coroutines-core:${Versions.kotlinCoroutines}" | ||
const val kotlinCoroutinesJDK8 = "org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:${Versions.kotlinCoroutinesJDK8}" | ||
const val kotlinNodejs = "org.jetbrains.kotlinx:kotlinx-nodejs:${Versions.kotlinNodejs}" | ||
const val kotlinDatetime = "org.jetbrains.kotlinx:kotlinx-datetime:${Versions.kotlinDatetime}" | ||
const val grpcKotlinStub = "io.grpc:grpc-kotlin-stub:${Versions.grpcKotlinStub}" | ||
const val grpcKotlinOkhttp = "io.grpc:grpc-okhttp:${Versions.grpcKotlinOkhttp}" | ||
|
||
const val bitcoinj = "org.bitcoinj:bitcoinj-core:${Versions.bitcoinj}" | ||
const val bitcoinKmp = "fr.acinq.bitcoin:bitcoin-kmp:${Versions.bitcoinKmp}" | ||
|
||
const val pbandkRuntime = "io.iohk:pbandk-runtime:${Versions.pbandk}" | ||
const val pbandkProtocGen = "io.iohk:protoc-gen-pbandk-lib-jvm:${Versions.pbandk}" | ||
// NOTE: this adds Kotlin interop with some of the jvm8 features (e.g. CompletableFuture). | ||
const val pbandkProtocGenJDK8 = "io.iohk:protoc-gen-pbandk-jvm:${Versions.pbandk}:jvm8@jar" | ||
const val pbandkPrismClientsGenerator = "io.iohk.atala:pbandk-prism-clients-generator:${Versions.pbandk}" | ||
|
||
const val protobufJava = "com.google.protobuf:protobuf-java:${Versions.protobuf}" | ||
const val protobufProtoc = "com.google.protobuf:protoc:${Versions.protobuf}" | ||
const val protobufLite = "io.grpc:grpc-protobuf-lite:${Versions.protobufLite}" | ||
|
||
const val betterParse = "com.github.h0tk3y.betterParse:better-parse:${Versions.betterParse}" | ||
const val krypto = "com.soywiz.korlibs.krypto:krypto:${Versions.krypto}" | ||
const val guava = "com.google.guava:guava:${Versions.guava}" | ||
const val spongyCastle = "com.madgag.spongycastle:prov:${Versions.spongyCastle}" | ||
const val bouncyCastle = "org.bouncycastle:bcprov-jdk15on:${Versions.bouncyCastle}" | ||
const val uuid = "com.benasher44:uuid:${Versions.uuid}" | ||
} |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
object PluginVersions { | ||
const val multiplatform = "1.6.0" | ||
const val androidLibrary = "4.1.2" | ||
const val protobuf = "0.8.14" | ||
const val npmPublish = "2.0.2" | ||
const val gitVersion = "0.12.3" | ||
const val klint = "10.0.0" | ||
const val multiplatformSwift = "2.0.3" | ||
const val kfcDefinitions = "4.32.0" | ||
const val compatibilityValidator = "0.8.0-RC" | ||
const val gitOps = "5.0.0-rc.3" | ||
const val koverage = "0.5.0" | ||
const val dokka = "1.7.0" | ||
} |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
object Plugins { | ||
const val multiplatform = "multiplatform" | ||
const val serialization = "plugin.serialization" | ||
const val androidLibrary = "com.android.library" | ||
const val protobuf = "com.google.protobuf" | ||
const val npmPublish = "dev.petuska.npm.publish" | ||
const val gitVersion = "com.palantir.git-version" | ||
const val klint = "org.jlleitschuh.gradle.ktlint" | ||
const val multiplatformSwift = "com.chromaticnoise.multiplatform-swiftpackage" | ||
const val kfcDefinitions = "com.github.turansky.kfc.definitions" | ||
const val compatibilityValidator = "org.jetbrains.kotlinx.binary-compatibility-validator" | ||
const val gitOps = "org.ajoberstar.grgit" | ||
const val koverage = "org.jetbrains.kotlinx.kover" | ||
const val dokka = "org.jetbrains.dokka" | ||
} |
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
object Versions { | ||
const val jvmTarget = "11" | ||
const val iosTarget = "13" | ||
const val androidTargetSdk = 29 | ||
const val androidMinSdk = 26 | ||
|
||
const val kotlinSerializationJson = "1.3.0" | ||
const val kotlinBignum = "0.3.1" | ||
const val kotlinCoroutines = "1.5.1-new-mm-dev2" | ||
const val kotlinCoroutinesJDK8 = "1.5.2" | ||
const val kotlinNodejs = "0.0.7" | ||
const val kotlinDatetime = "0.2.1" | ||
const val grpcKotlinStub = "1.0.0" | ||
const val grpcKotlinOkhttp = "1.36.0" | ||
|
||
const val bitcoinj = "0.15.10" | ||
const val bitcoinKmp = "0.7.0" | ||
|
||
const val pbandk = "0.20.7" | ||
const val protobuf = "3.12.0" | ||
const val protobufLite = "1.36.0" | ||
|
||
const val swiftTools = "5.3" | ||
const val betterParse = "0.4.3" | ||
const val krypto = "2.4.12" | ||
const val guava = "30.1-jre" | ||
const val spongyCastle = "1.58.0.0" | ||
const val bouncyCastle = "1.68" | ||
const val uuid = "0.3.0" | ||
} |
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
Oops, something went wrong.