Skip to content

Commit

Permalink
feat(kotlin): move the binary artifacts to a separate jar (for use in…
Browse files Browse the repository at this point in the history
… Dart as well)
  • Loading branch information
mehcode committed Jun 16, 2022
1 parent 92f1d8f commit 53195f6
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 9 deletions.
2 changes: 1 addition & 1 deletion sdk/kotlin/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.gradle/
build/
src/main/resources/com/hedera/hashgraph/sdk/native
native/src/main/resources/com/hedera/hashgraph/sdk/native
4 changes: 4 additions & 0 deletions sdk/kotlin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ plugins {
`java-library`
}

group = "com.hedera.hashgraph"
version = "0.0.0"

repositories {
mavenCentral()
}
Expand All @@ -13,6 +16,7 @@ java {
}

dependencies {
implementation(project("native"))
implementation(platform("org.jetbrains.kotlin:kotlin-bom"))
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:1.6.2")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
Expand Down
16 changes: 16 additions & 0 deletions sdk/kotlin/native/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
plugins {
`java-library`
`maven-publish`
}

group = "com.hedera.hashgraph"
version = "0.0.0"

java {
sourceCompatibility = JavaVersion.VERSION_16
targetCompatibility = JavaVersion.VERSION_16
}

tasks.jar {
archiveBaseName.set("sdk-native")
}
1 change: 1 addition & 0 deletions sdk/kotlin/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
rootProject.name = "hedera-sdk-kotlin"
include("examples")
include("native")
16 changes: 8 additions & 8 deletions sdk/rust/Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ tasks:
- cp ../swift/CHedera.xcframework/module.modulemap ../swift/CHedera.xcframework/macos-arm64/Headers/

# Package for Kotlin
- rm -rf ../kotlin/src/main/resources/com/hedera/hashgraph/sdk/native
- mkdir -p ../kotlin/src/main/resources/com/hedera/hashgraph/sdk/native/windows/amd64/
- mkdir -p ../kotlin/src/main/resources/com/hedera/hashgraph/sdk/native/macos/{amd64,aarch64}/
- mkdir -p ../kotlin/src/main/resources/com/hedera/hashgraph/sdk/native/linux/amd64/
- cp target/debug/libhedera.so ../kotlin/src/main/resources/com/hedera/hashgraph/sdk/native/linux/amd64/ 2> /dev/null || true
- cp target/debug/libhedera.dylib ../kotlin/src/main/resources/com/hedera/hashgraph/sdk/native/macos/amd64/ 2> /dev/null || true
- cp target/debug/libhedera.dylib ../kotlin/src/main/resources/com/hedera/hashgraph/sdk/native/macos/aarch64/ 2> /dev/null || true
- cp target/debug/hedera.dll ../kotlin/src/main/resources/com/hedera/hashgraph/sdk/native/windows/amd64/ 2> /dev/null || true
- rm -rf ../kotlin/native/src/main/resources/com/hedera/hashgraph/sdk/native
- mkdir -p ../kotlin/native/src/main/resources/com/hedera/hashgraph/sdk/native/windows/amd64/
- mkdir -p ../kotlin/native/src/main/resources/com/hedera/hashgraph/sdk/native/macos/{amd64,aarch64}/
- mkdir -p ../kotlin/native/src/main/resources/com/hedera/hashgraph/sdk/native/linux/amd64/
- cp target/debug/libhedera.so ../kotlin/native/src/main/resources/com/hedera/hashgraph/sdk/native/linux/amd64/ 2> /dev/null || true
- cp target/debug/libhedera.dylib ../kotlin/native/src/main/resources/com/hedera/hashgraph/sdk/native/macos/amd64/ 2> /dev/null || true
- cp target/debug/libhedera.dylib ../kotlin/native/src/main/resources/com/hedera/hashgraph/sdk/native/macos/aarch64/ 2> /dev/null || true
- cp target/debug/hedera.dll ../kotlin/native/src/main/resources/com/hedera/hashgraph/sdk/native/windows/amd64/ 2> /dev/null || true

# Package for Go
- cp ../c/include/hedera.h ../go/native
Expand Down

0 comments on commit 53195f6

Please sign in to comment.