Skip to content

Commit cf74e91

Browse files
committed
refactoring gradle prop
1 parent 1f9ee8d commit cf74e91

File tree

6 files changed

+25
-20
lines changed

6 files changed

+25
-20
lines changed

build.gradle.kts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@ buildscript {
1111
}
1212

1313
plugins {
14-
val kotlinVersion: String by System.getProperties()
15-
kotlin("jvm") version kotlinVersion
14+
val kotlin_version: String by System.getProperties()
15+
val nexus_version: String by System.getProperties()
1616

17-
id("io.codearte.nexus-staging") version "0.22.0"
17+
kotlin("jvm") version kotlin_version
18+
id("io.codearte.nexus-staging") version nexus_version
1819
}
1920

20-
val kotlinVersion: String by System.getProperties()
21-
val multikVersion: String by project
21+
val kotlin_version: String by System.getProperties()
22+
val multik_version: String by project
2223
val unpublished = listOf("multik", "multik_jni")
2324

2425
allprojects {
@@ -27,7 +28,7 @@ allprojects {
2728
}
2829

2930
group = "org.jetbrains.kotlinx"
30-
version = multikVersion
31+
version = multik_version
3132

3233
tasks.withType<KotlinCompile> {
3334
kotlinOptions.jvmTarget = "1.8"

gradle.properties

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11
kotlin.code.style=official
2-
systemProp.kotlinVersion=1.5.31
3-
multikVersion=0.1.0-dev-3
2+
3+
multik_version=0.1.0
4+
5+
systemProp.kotlin_version=1.5.31
6+
systemProp.nexus_version=0.22.0
7+
systemProp.dokka_version=1.5.31
8+
9+
openblas_version=0.3.18
10+
common_csv_version=1.9.0

gradle/openblas.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55

66
ext {
7-
openblasBranch = 'v0.3.18'
8-
openblasRoot = '0.3.18'
7+
openblasBranch = "v$openblas_version"
8+
openblasRoot = openblas_version
99
}
1010

1111
buildscript {

multik-api/build.gradle.kts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,19 @@
33
*/
44

55
plugins {
6-
id("org.jetbrains.dokka") version "1.5.0"
6+
val dokka_version: String by System.getProperties()
7+
8+
id("org.jetbrains.dokka") version dokka_version
79
}
810

911
kotlin {
1012
explicitApi()
1113
}
1214

15+
val common_csv_version: String by project
1316
dependencies {
1417
implementation(kotlin("reflect"))
15-
implementation("org.apache.commons:commons-csv:1.9.0")
18+
implementation("org.apache.commons:commons-csv:$common_csv_version")
1619
}
1720

1821

multik-native/build.gradle.kts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ val os = when {
1919
}
2020

2121
tasks.jar {
22-
dependsOn("multik_jni:assembleRelease${os.capitalize()}")
2322
from("$buildDir/libs")
2423
exclude("*.jar")
2524
}
@@ -30,9 +29,6 @@ tasks.test {
3029
doFirst {
3130
copy {
3231
from(fileTree("${project.childProjects["multik_jni"]!!.buildDir}/lib/main/debug").files)
33-
// from(fileTree("${project.childProjects["multik_jni"]!!.buildDir}/lib/main/release/${os}/").files.filter {
34-
// "stripped" !in it.path
35-
// })
3632
into("$buildDir/libs")
3733
}
3834
}

multik-native/multik_jni/build.gradle.kts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ plugins {
1111
apply(from = "$rootDir/gradle/openblas.gradle")
1212

1313
val gccMinGWPath: String? = System.getenv("MinGW_x64_Bin_Path")
14-
val gccLibPath: String? = System.getenv("path_to_libgcc")
15-
val gccDarwin: String? = System.getenv("path_to_gcc_darwin") ?: gccLibPath
14+
val gccLibPath: String = System.getenv("path_to_libgcc") ?: ""
15+
val gccDarwin: String = System.getenv("path_to_gcc_darwin") ?: gccLibPath
1616

1717
library {
1818
source.from(file("src/main/cpp"))
@@ -67,8 +67,6 @@ tasks.withType(LinkSharedLibrary::class.java).configureEach {
6767
"$gccDarwin/libgcc.a",
6868
"$gccLibPath/libgfortran.a", "$gccLibPath/libquadmath.a"
6969
)
70-
it.operatingSystem.isLinux -> emptyList()
71-
// listOf("$gccLibPath/libgfortran.a", "$gccLibPath/libquadmath.a")
7270
else -> emptyList()
7371
}
7472
}

0 commit comments

Comments
 (0)