-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
113 lines (99 loc) · 3.85 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties
plugins {
kotlin("multiplatform") version "1.9.20"
id("com.android.library")
id("maven-publish")
}
// For publishing; publish with:
// ./gradlew publishAllPublicationsToGitHubPackagesRepository
group = "com.crossoid"
version = "1.0.1"
repositories {
google()
mavenCentral()
}
kotlin {
androidTarget() {
publishLibraryVariants("release", "debug")
}
iosArm64() {
binaries {
framework {
baseName = "library"
}
}
// Build a native interop from the boringssl library; details here:
// https://kotlinlang.org/docs/mpp-dsl-reference.html#cinterops
// The boringssl provides the BIGNUM implementation
compilations["main"].cinterops {
compilations["main"].cinterops {
val boringssl by creating {
// Def-file describing the native API.
defFile(project.file("./bignum/ios/boringssl.def"))
// Package to place the Kotlin API generated.
packageName("boringssl")
// Options to be passed to compiler by cinterop tool.
compilerOpts("-I./bignum/ios/boringssl/include -L./bignum/ios/boringssl/build-arm64/crypto -L./bignum/ios/boringssl/build-arm64/ssl")
// Directories for header search (an analogue of the -I<path> compiler option).
//includeDirs.allHeaders("path1", "path2")
// A shortcut for includeDirs.allHeaders.
//includeDirs("include/directory", "another/directory")
}
}
}
}
iosSimulatorArm64() {
binaries {
framework {
baseName = "library"
}
}
// Build a native interop from the boringssl library; details here:
// https://kotlinlang.org/docs/mpp-dsl-reference.html#cinterops
// The boringssl provides the BIGNUM implementation
compilations["main"].cinterops {
compilations["main"].cinterops {
val boringssl by creating {
// Def-file describing the native API.
defFile(project.file("./bignum/ios/boringssl-simulator.def"))
// Package to place the Kotlin API generated.
packageName("boringssl")
// Options to be passed to compiler by cinterop tool.
compilerOpts("-I./bignum/ios/boringssl/include -L./bignum/ios/boringssl/build-arm64-simulator/crypto -L./bignum/ios/boringssl/build-arm64-simulator/ssl")
// Directories for header search (an analogue of the -I<path> compiler option).
//includeDirs.allHeaders("path1", "path2")
// A shortcut for includeDirs.allHeaders.
//includeDirs("include/directory", "another/directory")
}
}
}
}
sourceSets {
val commonTest by getting {
dependencies {
implementation(kotlin("test-common"))
implementation(kotlin("test-annotations-common"))
}
}
}
}
android {
compileOptions {
sourceCompatibility(JavaVersion.VERSION_17)
targetCompatibility(JavaVersion.VERSION_17)
}
compileSdk = 34
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
}
publishing {
repositories {
maven {
name = "GitHubPackages"
setUrl("https://maven.pkg.github.com/crossoid/Kotlin-Native-BigDecimal")
credentials {
username = gradleLocalProperties(rootDir).getProperty("github_user")
password = gradleLocalProperties(rootDir).getProperty("github_token")
}
}
}
}