-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle.kts
54 lines (49 loc) · 1.5 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
plugins {
id("io.github.gradle-nexus.publish-plugin") version "1.3.0"
}
buildscript {
val ndkVersion = File(project.findProperty("ndkPath") as String).name
val majorNdkVersion = ndkVersion.split(".")[0].toInt()
val minSdkSupportedByNdk = if (majorNdkVersion >= 26) {
21
} else {
19
}
extra.apply {
set("ndkVersionSuffix", "-ndk${majorNdkVersion}")
set("minSdkSupportedByNdk", minSdkSupportedByNdk)
when (project.findProperty("libraryType")) {
"shared" -> {
set("libraryType", "shared")
set("libraryTypeSuffix", "-shared")
set("dependencyLibraryTypeSuffix", "-static")
}
"shared-with-shared-deps" -> {
set("libraryType", "shared-with-shared-deps")
set("libraryTypeSuffix", "-shared-with-shared-deps")
set("dependencyLibraryTypeSuffix", "-shared-with-shared-deps")
}
else /* static */ -> {
set("libraryType", "static")
set("libraryTypeSuffix", "-static")
set("dependencyLibraryTypeSuffix", "-static")
}
}
}
}
group = "com.viliussutkus89.ndk.thirdparty"
version = "1.0.0"
repositories {
mavenCentral()
google()
}
nexusPublishing {
project.findProperty("repoDescription")?.toString()?.let {
if (it.isNotEmpty()) {
repositoryDescription.set(it)
}
}
repositories {
sonatype()
}
}