mirror of
https://github.com/tribufu/tribufu-java
synced 2026-05-06 14:57:27 +00:00
Create Kotlin Library
This commit is contained in:
parent
6b651b2c48
commit
c2c0e18986
11 changed files with 332 additions and 0 deletions
32
lib/build.gradle.kts
Normal file
32
lib/build.gradle.kts
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
kotlin("jvm") version "1.4.10"
|
||||
|
||||
`java-library`
|
||||
}
|
||||
|
||||
group = "tribufu"
|
||||
version = "0.0.1"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testImplementation(kotlin("test-junit"))
|
||||
}
|
||||
|
||||
tasks.test {
|
||||
useJUnit()
|
||||
}
|
||||
|
||||
tasks.jar {
|
||||
manifest {
|
||||
attributes(mapOf("Implementation-Title" to project.name, "Implementation-Version" to project.version))
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<KotlinCompile>() {
|
||||
kotlinOptions.jvmTarget = "1.8"
|
||||
}
|
||||
18
lib/src/main/kotlin/tribufu/TribuFu.kt
Normal file
18
lib/src/main/kotlin/tribufu/TribuFu.kt
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
// Copyright (c) TribuFu. All Rights Reserved
|
||||
|
||||
package tribufu
|
||||
|
||||
class TribuFu {
|
||||
/**
|
||||
* A native method that is implemented by the 'TribuFu' native library, which is packaged with
|
||||
* this library.
|
||||
*/
|
||||
// external fun Hello(): Int
|
||||
|
||||
companion object {
|
||||
// Used to load the 'TribuFu' library on application startup.
|
||||
init {
|
||||
//System.loadLibrary("TribuFu")
|
||||
}
|
||||
}
|
||||
}
|
||||
0
lib/src/main/resources/.gitkeep
Normal file
0
lib/src/main/resources/.gitkeep
Normal file
0
lib/src/test/kotlin/.gitkeep
Normal file
0
lib/src/test/kotlin/.gitkeep
Normal file
0
lib/src/test/resources/.gitkeep
Normal file
0
lib/src/test/resources/.gitkeep
Normal file
Loading…
Add table
Add a link
Reference in a new issue