-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
19 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters