Skip to content

Commit b3f3164

Browse files
committed
v3.2.9
1 parent d974dba commit b3f3164

File tree

6 files changed

+19
-59
lines changed

6 files changed

+19
-59
lines changed

build.gradle.kts

+11-43
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,21 @@
1-
import org.gradle.api.attributes.java.TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE
2-
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
31

42
plugins {
3+
val build = "0.3.6"
4+
id("kx.kotlin.11") version build
5+
id("kx.dokka") version build
56
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`
108
}
119

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"
1512

1613
repositories {
17-
mavenCentral()
18-
jcenter()
14+
maven("https://repo.repsy.io/mvn/elect/kx")
1915
}
2016

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"])
4220
}
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+
}

gradle.properties

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
org.gradle.jvmargs=-XX:MaxMetaspaceSize=1g
2-
#org.gradle.daemon=false
2+
#org.gradle.daemon=false
3+
4+
platformVersion=0.0.3

gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip

settings.gradle.kts

+2-9
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
1-
rootProject.name = "kotlin-unsigned"
1+
rootProject.name = "unsigned"
22

33
pluginManagement {
4-
5-
resolutionStrategy {
6-
eachPlugin {
7-
if(requested.id.id == "docs")
8-
useModule("com.github.elect86:docs:9c008a8b")//.also { println("found") }
9-
}
10-
}
114
repositories {
125
gradlePluginPortal()
13-
maven("https://jitpack.io")
6+
maven("https://repo.repsy.io/mvn/elect/kx")
147
}
158
}

src/main/java/module-info.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
module com.github.kotlin_graphics.kotlin_unsigned {
1+
module com.github.kotlin.graphics.unsigned {
22

3-
// requires kotlin.stdlib;
43
requires kotlin.stdlib.jdk8;
54

65
exports unsigned;

src/main/kotlin/unsigned/unsigned.kt

+1-3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,4 @@ fun Number.toUshort() = Ushort(toShort())
1616
fun Char.toUbyte() = Ubyte(toByte())
1717
fun Char.toUint() = Uint(toInt())
1818
fun Char.toUlong() = Ulong(toLong())
19-
fun Char.toUshort() = Ushort(toShort())
20-
21-
val version = "3.2.8"
19+
fun Char.toUshort() = Ushort(toShort())

0 commit comments

Comments
 (0)