Skip to content

Commit

Permalink
v3.2.9
Browse files Browse the repository at this point in the history
  • Loading branch information
elect86 committed Mar 5, 2021
1 parent d974dba commit b3f3164
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 59 deletions.
54 changes: 11 additions & 43 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,53 +1,21 @@
import org.gradle.api.attributes.java.TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
val build = "0.3.6"
id("kx.kotlin.11") version build
id("kx.dokka") version build
java
kotlin("jvm") version "1.4.30"
`maven-publish` // Jitpack
id("org.jetbrains.dokka") version "1.4.20"
id("docs")
`maven-publish`
}

val group = "com.github.kotlin_graphics"
val moduleName = "$group.kotlin_unsigned"
val kotestVersion = "4.3.2"
group = "com.github.kotlin.graphics"
version = "3.2.9"

repositories {
mavenCentral()
jcenter()
maven("https://repo.repsy.io/mvn/elect/kx")
}

dependencies {
implementation(kotlin("stdlib-jdk8"))

testImplementation("io.kotest:kotest-runner-junit5-jvm:$kotestVersion")
testImplementation("io.kotest:kotest-assertions-core-jvm:$kotestVersion")
}

java.modularity.inferModulePath.set(true)

tasks {

withType<KotlinCompile>().all {
kotlinOptions {
jvmTarget = "11"
freeCompilerArgs += listOf("-Xinline-classes", "-Xopt-in=kotlin.RequiresOptIn")
}
sourceCompatibility = "11"
}

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'
options.compilerArgs = listOf("--patch-module", "$moduleName=${sourceSets.main.get().output.asPath}")
publishing {
publications.create<MavenPublication>("mavenJava") {
from(components["java"])
}

withType<Test> { useJUnitPlatform() }
}

publishing.publications.register("mavenJava", MavenPublication::class) {
from(components["java"])
}

configurations.all { attributes.attribute(TARGET_JVM_VERSION_ATTRIBUTE, 11) }

java.withSourcesJar()
}
4 changes: 3 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
org.gradle.jvmargs=-XX:MaxMetaspaceSize=1g
#org.gradle.daemon=false
#org.gradle.daemon=false

platformVersion=0.0.3
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
11 changes: 2 additions & 9 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
rootProject.name = "kotlin-unsigned"
rootProject.name = "unsigned"

pluginManagement {

resolutionStrategy {
eachPlugin {
if(requested.id.id == "docs")
useModule("com.github.elect86:docs:9c008a8b")//.also { println("found") }
}
}
repositories {
gradlePluginPortal()
maven("https://jitpack.io")
maven("https://repo.repsy.io/mvn/elect/kx")
}
}
3 changes: 1 addition & 2 deletions src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
module com.github.kotlin_graphics.kotlin_unsigned {
module com.github.kotlin.graphics.unsigned {

// requires kotlin.stdlib;
requires kotlin.stdlib.jdk8;

exports unsigned;
Expand Down
4 changes: 1 addition & 3 deletions src/main/kotlin/unsigned/unsigned.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,4 @@ fun Number.toUshort() = Ushort(toShort())
fun Char.toUbyte() = Ubyte(toByte())
fun Char.toUint() = Uint(toInt())
fun Char.toUlong() = Ulong(toLong())
fun Char.toUshort() = Ushort(toShort())

val version = "3.2.8"
fun Char.toUshort() = Ushort(toShort())

0 comments on commit b3f3164

Please sign in to comment.