1
- import org.gradle.api.attributes.java.TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE
2
- import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
3
1
4
2
plugins {
3
+ val build = " 0.3.6"
4
+ id(" kx.kotlin.11" ) version build
5
+ id(" kx.dokka" ) version build
5
6
java
6
- kotlin(" jvm" ) version " 1.4.30"
7
- `maven- publish` // Jitpack
8
- id(" org.jetbrains.dokka" ) version " 1.4.20"
9
- id(" docs" )
7
+ `maven- publish`
10
8
}
11
9
12
- val group = " com.github.kotlin_graphics"
13
- val moduleName = " $group .kotlin_unsigned"
14
- val kotestVersion = " 4.3.2"
10
+ group = " com.github.kotlin.graphics"
11
+ version = " 3.2.9"
15
12
16
13
repositories {
17
- mavenCentral()
18
- jcenter()
14
+ maven(" https://repo.repsy.io/mvn/elect/kx" )
19
15
}
20
16
21
- dependencies {
22
- implementation(kotlin(" stdlib-jdk8" ))
23
-
24
- testImplementation(" io.kotest:kotest-runner-junit5-jvm:$kotestVersion " )
25
- testImplementation(" io.kotest:kotest-assertions-core-jvm:$kotestVersion " )
26
- }
27
-
28
- java.modularity.inferModulePath.set(true )
29
-
30
- tasks {
31
-
32
- withType<KotlinCompile >().all {
33
- kotlinOptions {
34
- jvmTarget = " 11"
35
- freeCompilerArgs + = listOf (" -Xinline-classes" , " -Xopt-in=kotlin.RequiresOptIn" )
36
- }
37
- sourceCompatibility = " 11"
38
- }
39
-
40
- compileJava { // this is needed because we have a separate compile step in this example with the 'module-info.java' is in 'main/java' and the Kotlin code is in 'main/kotlin'
41
- options.compilerArgs = listOf (" --patch-module" , " $moduleName =${sourceSets.main.get().output.asPath} " )
17
+ publishing {
18
+ publications.create<MavenPublication >(" mavenJava" ) {
19
+ from(components[" java" ])
42
20
}
43
-
44
- withType<Test > { useJUnitPlatform() }
45
- }
46
-
47
- publishing.publications.register(" mavenJava" , MavenPublication ::class ) {
48
- from(components[" java" ])
49
- }
50
-
51
- configurations.all { attributes.attribute(TARGET_JVM_VERSION_ATTRIBUTE , 11 ) }
52
-
53
- java.withSourcesJar()
21
+ }
0 commit comments