Skip to content

Commit 54e768b

Browse files
committed
bump up
1 parent 4d78ea8 commit 54e768b

File tree

12 files changed

+259
-93
lines changed

12 files changed

+259
-93
lines changed

.gitignore

Lines changed: 162 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,164 @@
1+
# Created by https://www.toptal.com/developers/gitignore/api/java,gradle,intellij,kotlin
2+
# Edit at https://www.toptal.com/developers/gitignore?templates=java,gradle,intellij,kotlin
13

2-
.gradle/
3-
#.idea/gradle.xml
4-
#.idea/inspectionProfiles/
5-
#.idea/libraries/Gradle__com_github_kotlin_graphics_gli_1865f5ce67256d644efa8069017c873798c7f165.xml
6-
#.idea/libraries/Gradle__com_github_kotlin_graphics_uno_sdk_01a5162a7a2e51391ddaed9e625692f8716711c9.xml
7-
#.idea/libraries/Gradle__org_lwjgl_lwjgl_3_1_2_SNAPSHOT_natives_linux.xml
8-
#.idea/libraries/Gradle__org_lwjgl_lwjgl_glfw_3_1_2_SNAPSHOT_natives_linux.xml
9-
#.idea/libraries/Gradle__org_lwjgl_lwjgl_jemalloc_3_1_2_SNAPSHOT_natives_linux.xml
10-
#.idea/libraries/Gradle__org_lwjgl_lwjgl_openal_3_1_2_SNAPSHOT_natives_linux.xml
11-
#.idea/libraries/Gradle__org_lwjgl_lwjgl_opengl_3_1_2_SNAPSHOT_natives_linux.xml
12-
#.idea/libraries/Gradle__org_lwjgl_lwjgl_stb_3_1_2_SNAPSHOT_natives_linux.xml
13-
#.idea/misc.xml
14-
#.idea/modules.xml
15-
#.idea/modules/
16-
#.idea/uiDesigner.xml
17-
#.idea/vcs.xml
18-
#.idea/workspace.xml
4+
### Intellij ###
5+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
6+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
7+
8+
# User-specific stuff
9+
.idea/**/workspace.xml
10+
.idea/**/tasks.xml
11+
.idea/**/usage.statistics.xml
12+
.idea/**/dictionaries
13+
.idea/**/shelf
14+
15+
# Generated files
16+
.idea/**/contentModel.xml
17+
18+
# Sensitive or high-churn files
19+
.idea/**/dataSources/
20+
.idea/**/dataSources.ids
21+
.idea/**/dataSources.local.xml
22+
.idea/**/sqlDataSources.xml
23+
.idea/**/dynamic.xml
24+
.idea/**/uiDesigner.xml
25+
.idea/**/dbnavigator.xml
26+
27+
# Gradle
28+
.idea/**/gradle.xml
29+
.idea/**/libraries
30+
31+
# Gradle and Maven with auto-import
32+
# When using Gradle or Maven with auto-import, you should exclude module files,
33+
# since they will be recreated, and may cause churn. Uncomment if using
34+
# auto-import.
35+
# .idea/artifacts
36+
# .idea/compiler.xml
37+
# .idea/jarRepositories.xml
38+
# .idea/modules.xml
39+
# .idea/*.iml
40+
# .idea/modules
41+
# *.iml
42+
# *.ipr
43+
44+
# CMake
45+
cmake-build-*/
46+
47+
# Mongo Explorer plugin
48+
.idea/**/mongoSettings.xml
49+
50+
# File-based project format
51+
*.iws
52+
53+
# IntelliJ
54+
out/
55+
56+
# mpeltonen/sbt-idea plugin
57+
.idea_modules/
58+
59+
# JIRA plugin
60+
atlassian-ide-plugin.xml
61+
62+
# Cursive Clojure plugin
63+
.idea/replstate.xml
64+
65+
# Crashlytics plugin (for Android Studio and IntelliJ)
66+
com_crashlytics_export_strings.xml
67+
crashlytics.properties
68+
crashlytics-build.properties
69+
fabric.properties
70+
71+
# Editor-based Rest Client
72+
.idea/httpRequests
73+
74+
# Android studio 3.1+ serialized cache file
75+
.idea/caches/build_file_checksums.ser
76+
77+
### Intellij Patch ###
78+
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
79+
80+
# *.iml
81+
# modules.xml
82+
# .idea/misc.xml
83+
# *.ipr
84+
85+
# Sonarlint plugin
86+
# https://plugins.jetbrains.com/plugin/7973-sonarlint
87+
.idea/**/sonarlint/
88+
89+
# SonarQube Plugin
90+
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
91+
.idea/**/sonarIssues.xml
92+
93+
# Markdown Navigator plugin
94+
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
95+
.idea/**/markdown-navigator.xml
96+
.idea/**/markdown-navigator-enh.xml
97+
.idea/**/markdown-navigator/
98+
99+
# Cache file creation bug
100+
# See https://youtrack.jetbrains.com/issue/JBR-2257
101+
.idea/$CACHE_FILE$
102+
103+
# CodeStream plugin
104+
# https://plugins.jetbrains.com/plugin/12206-codestream
105+
.idea/codestream.xml
106+
107+
### Java ###
108+
# Compiled class file
109+
*.class
110+
111+
# Log file
112+
*.log
113+
114+
# BlueJ files
115+
*.ctxt
116+
117+
# Mobile Tools for Java (J2ME)
118+
.mtj.tmp/
119+
120+
# Package Files #
121+
*.jar
122+
*.war
123+
*.nar
124+
*.ear
125+
*.zip
126+
*.tar.gz
127+
*.rar
128+
129+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
130+
hs_err_pid*
131+
132+
### Kotlin ###
133+
# Compiled class file
134+
135+
# Log file
136+
137+
# BlueJ files
138+
139+
# Mobile Tools for Java (J2ME)
140+
141+
# Package Files #
142+
143+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
144+
145+
### Gradle ###
146+
.gradle
19147
build/
20-
/.idea/
21-
22-
# Project exclude paths
23-
/out/
24-
/uno-core/out/
25-
/uno-gl/out/
26-
/uno-gl/out/production/classes/
27-
/uno-awt/out/
28-
/uno-awt/out/test/classes/
29-
/uno-awt/out/production/classes/
30-
/uno-vk/out/
31-
/uno-vk/out/production/classes/
32-
33-
report.txt
148+
149+
# Ignore Gradle GUI config
150+
gradle-app.setting
151+
152+
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
153+
!gradle-wrapper.jar
154+
155+
# Cache of project
156+
.gradletasknamecache
157+
158+
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
159+
# gradle/wrapper/gradle-wrapper.properties
160+
161+
### Gradle Patch ###
162+
**/build/
163+
164+
# End of https://www.toptal.com/developers/gitignore/api/java,gradle,intellij,kotlin

build.gradle.kts

Lines changed: 53 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,29 @@
1-
import org.gradle.api.attributes.LibraryElements.*
1+
import org.gradle.api.attributes.LibraryElements.JAR
2+
import org.gradle.api.attributes.LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE
23
import org.jetbrains.dokka.gradle.DokkaTask
4+
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
5+
import java.net.URL
36

47
plugins {
58
java
6-
`java-library`
7-
kotlin("jvm") version "1.3.72"
8-
maven
9+
kotlin("jvm") version "1.4.0"
10+
`maven-publish`
911
// id "org.jetbrains.kotlin.kapt" version "1.3.10"
10-
id("org.jetbrains.dokka") version "0.10.1"
11-
id("com.github.johnrengelman.shadow") version "5.2.0"
12+
id("org.jetbrains.dokka") version "1.4.0"
13+
id("com.github.johnrengelman.shadow") version "6.0.0"
1214
}
1315

1416
allprojects {
1517
apply(plugin = "java")
16-
apply(plugin = "java-library")
1718
apply(plugin = "org.jetbrains.kotlin.jvm")
18-
apply(plugin = "maven")
19+
apply(plugin = "maven-publish")
1920
apply(plugin = "org.jetbrains.dokka")
2021
apply(plugin = "com.github.johnrengelman.shadow")
2122

2223
// version = "0.9-beta"
2324
group = "com.github.kotlin_graphics"
2425

25-
java {
26-
modularity.inferModulePath.set(true)
27-
}
26+
java { modularity.inferModulePath.set(true) }
2827

2928
dependencies {
3029

@@ -35,55 +34,78 @@ allprojects {
3534
components { withModule<ModularKotlinRule>(kotlin("stdlib")) }
3635
components { withModule<ModularKotlinRule>(kotlin("stdlib-jdk8")) }
3736

38-
listOf("runner-junit5", "assertions-core", "runner-console"/*, "property"*/).forEach {
39-
testImplementation("io.kotest:kotest-$it-jvm:${findProperty("kotestVersion")}")
40-
}
37+
implementation(platform("org.lwjgl:lwjgl-bom:${findProperty("lwjglVersion")}"))
38+
39+
testImplementation("io.kotest:kotest-runner-junit5-jvm:${findProperty("kotestVersion")}")
40+
testImplementation("io.kotest:kotest-assertions-core-jvm:${findProperty("kotestVersion")}")
4141
}
4242

4343
repositories {
4444
mavenCentral()
4545
jcenter()
46-
maven { url = uri("https://jitpack.io") }
46+
maven("https://jitpack.io")
4747
}
4848

4949
tasks {
50-
val dokka by getting(DokkaTask::class) {
51-
outputFormat = "html"
52-
outputDirectory = "$buildDir/dokka"
50+
51+
dokkaHtml {
52+
dokkaSourceSets.configureEach {
53+
sourceLink {
54+
localDirectory.set(file("src/main/kotlin"))
55+
remoteUrl.set(URL("https://github.com/kotlin-graphics/gli/tree/master/src/main/kotlin"))
56+
remoteLineSuffix.set("#L")
57+
}
58+
}
5359
}
5460

55-
compileKotlin {
61+
withType<KotlinCompile>().all {
5662
kotlinOptions {
5763
jvmTarget = "11"
58-
freeCompilerArgs = listOf("-XXLanguage:+InlineClasses", "-Xjvm-default=enable")
64+
freeCompilerArgs += listOf("-Xinline-classes", "-Xopt-in=kotlin.RequiresOptIn")
5965
}
6066
sourceCompatibility = "11"
6167
}
6268

63-
compileTestKotlin {
64-
kotlinOptions.jvmTarget = "11"
65-
sourceCompatibility = "11"
66-
}
67-
6869
withType<Test> { useJUnitPlatform() }
6970
}
7071

71-
val dokkaJar by tasks.creating(Jar::class) {
72-
group = JavaBasePlugin.DOCUMENTATION_GROUP
73-
description = "Assembles Kotlin docs with Dokka"
72+
val dokkaJavadocJar by tasks.register<Jar>("dokkaJavadocJar") {
73+
dependsOn(tasks.dokkaJavadoc)
74+
from(tasks.dokkaJavadoc.get().outputDirectory.get())
7475
archiveClassifier.set("javadoc")
75-
from(tasks.dokka)
76+
}
77+
78+
val dokkaHtmlJar by tasks.register<Jar>("dokkaHtmlJar") {
79+
dependsOn(tasks.dokkaHtml)
80+
from(tasks.dokkaHtml.get().outputDirectory.get())
81+
archiveClassifier.set("html-doc")
7682
}
7783

7884
val sourceJar = task("sourceJar", Jar::class) {
79-
dependsOn(tasks["classes"])
85+
dependsOn(tasks.classes)
8086
archiveClassifier.set("sources")
8187
from(sourceSets.main.get().allSource)
8288
}
8389

8490
artifacts {
91+
archives(dokkaJavadocJar)
92+
archives(dokkaHtmlJar)
8593
archives(sourceJar)
86-
archives(dokkaJar)
94+
}
95+
96+
publishing {
97+
publications.create<MavenPublication>("mavenJava") {
98+
from(components["java"])
99+
artifact(sourceJar)
100+
}
101+
repositories.maven {
102+
name = "GitHubPackages"
103+
url = uri("https://maven.pkg.github.com/kotlin-graphics/uno-sdk")
104+
credentials {
105+
username = System.getenv("GITHUB_ACTOR")
106+
password = System.getenv("GITHUB_TOKEN")
107+
}
108+
}
87109
}
88110

89111
// == Add access to the 'modular' variant of kotlin("stdlib"): Put this into a buildSrc plugin and reuse it in all your subprojects

gradle.properties

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
unsignedVersion = 0af6fae4
2-
koolVersion = 3962a0be
3-
glmVersion = 5b0f3461
4-
gliVersion = 290b4a7f
5-
glnVersion = e2c023c8
6-
vkkVersion = 4f41c972
1+
unsignedVersion = 1e2fda82
2+
koolVersion = b393e4c2
3+
glmVersion = a4185eec
4+
gliVersion = 01358f8c
5+
glnVersion = 3e59f9ea
6+
vkkVersion = 11d817fe
77
lwjglVersion = 3.2.3
8-
kotestVersion = 4.0.5
8+
kotestVersion = 4.2.0
9+
10+
org.gradle.jvmargs=-XX:MaxMetaspaceSize=512m

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
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.4.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6-all.zip

uno-awt/build.gradle.kts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,18 @@ dependencies {
1414
// implementation("$kx:gli:${findProperty("gliVersion")}")
1515
implementation("$kx:gln:${findProperty("glnVersion")}")
1616

17-
val lwjglNatives = when (current()) {
17+
val lwjglNatives = "natives-" + when (current()) {
1818
WINDOWS -> "windows"
1919
LINUX -> "linux"
2020
else -> "macos"
2121
}
2222
listOf("", "-jawt", "-glfw", "-jemalloc", "-opengl").forEach {
23-
implementation("org.lwjgl:lwjgl$it:${findProperty("lwjglVersion")}")
23+
implementation("org.lwjgl", "lwjgl$it")
2424
if (it != "-jawt")
25-
implementation("org.lwjgl:lwjgl$it:${findProperty("lwjglVersion")}:natives-$lwjglNatives")
25+
runtimeOnly("org.lwjgl", "lwjgl$it", classifier = lwjglNatives)
2626
}
2727
}
2828

29-
tasks.compileJava {
30-
// 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'
29+
tasks.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'
3130
options.compilerArgs = listOf("--patch-module", "$moduleName=${sourceSets.main.get().output.asPath}")
3231
}

0 commit comments

Comments
 (0)