Skip to content

Commit 2bc8acb

Browse files
committed
0.8.3.0-16+23
1 parent 3b9d5d4 commit 2bc8acb

File tree

7 files changed

+29
-22
lines changed

7 files changed

+29
-22
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- uses: burrunan/gradle-cache-action@v1
2222
name: Build scenery
2323
with:
24-
arguments: build -x dokkaHtml -x dokkaHtmlJar -x javadoc -x dokkaJavadocJar
24+
arguments: build #-x dokkaHtml -x dokkaHtmlJar -x javadoc -x dokkaJavadocJar
2525
# - name: Cleanup Gradle Cache
2626
# # Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
2727
# # Restoring these files from a GitHub Actions cache might cause problems for future builds.
@@ -45,7 +45,7 @@ jobs:
4545
- uses: burrunan/gradle-cache-action@v1
4646
name: Build scenery
4747
with:
48-
arguments: build -x dokkaHtml -x dokkaHtmlJar -x javadoc -x dokkaJavadocJar
48+
arguments: build #-x dokkaHtml -x dokkaHtmlJar -x javadoc -x dokkaJavadocJar
4949
# - name: Cleanup Gradle Cache
5050
# # Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
5151
# # Restoring these files from a GitHub Actions cache might cause problems for future builds.
@@ -71,7 +71,7 @@ jobs:
7171
- uses: burrunan/gradle-cache-action@v1
7272
name: Build scenery
7373
with:
74-
arguments: build -x dokkaHtml -x dokkaHtmlJar -x javadoc -x dokkaJavadocJar
74+
arguments: build #-x dokkaHtml -x dokkaHtmlJar -x javadoc -x dokkaJavadocJar
7575
# - name: Cleanup Gradle Cache
7676
# # Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
7777
# # Restoring these files from a GitHub Actions cache might cause problems for future builds.

build.gradle.kts

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
1-
import kx.LwjglModules.*
2-
import kx.KxProject.*
3-
import kx.kxImplementation
4-
import kx.lwjglImplementation
1+
import kx.KxProject.glm
2+
import kx.KxProject.kool
3+
import kx.KxProject.unsigned
4+
import kx.Lwjgl
5+
import kx.Lwjgl.Modules.jemalloc
6+
import kx.Lwjgl.Modules.opengl
7+
import kx.implementation
58

69
plugins {
7-
val build = "0.7.0+79"
8-
id("kx.kotlin.11") version build
9-
id("kx.lwjgl") version build
10-
id("kx.dokka") version build
10+
val build = "0.7.3+41"
11+
id("kx.kotlin") version build
12+
// id("kx.dokka") version build
1113
id("kx.publish") version build
12-
java
14+
id("kx.dynamic-align") version build
15+
id("kx.util") version build
1316
}
1417

15-
version = "0.8.3.0-16+22"
16-
1718
dependencies {
1819

19-
kxImplementation(unsigned, kool, glm)
20+
implementation(unsigned, kool, glm)
2021

2122
// https://mvnrepository.com/artifact/com.twelvemonkeys.imageio/imageio-core
2223
listOf(/*"-batik",*/ "-bmp", "-core", "-icns", "-iff", "-jpeg", "-metadata", "-pcx", "-pdf", "-pict", "-pnm",
@@ -26,5 +27,5 @@ dependencies {
2627
// https://mvnrepository.com/artifact/org.apache.xmlgraphics/batik-transcoder
2728
//implementation "org.apache.xmlgraphics:batik-transcoder:1.12"
2829

29-
lwjglImplementation(jemalloc, opengl)
30+
Lwjgl { implementation(jemalloc, opengl) }
3031
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
org.gradle.jvmargs=-XX:MaxMetaspaceSize=1g
22
org.gradle.daemon=false
3-
platformVersion=0.2.8+44
3+
#systemProp.dynamicAlignVerbose=true

gradle/wrapper/gradle-wrapper.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ 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.3-bin.zip
7-
distributionSha256Sum=7faa7198769f872826c8ef4f1450f839ec27f0b4d5d1e51bade63667cbccd205
6+
distributionUrl=https://services.gradle.org/distributions/gradle-7.2-bin.zip
7+
distributionSha256Sum=f581709a9c35e9cb92e16f585d2c4bc99b2b1a5f85d2badbd3dc6bff59e1e6dd

settings.gradle.kts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,9 @@ pluginManagement {
55
gradlePluginPortal()
66
maven("https://raw.githubusercontent.com/kotlin-graphics/mary/master")
77
}
8+
}
9+
10+
gradle.rootProject {
11+
group = "kotlin.graphics"
12+
version = "0.8.3.0-16+23"
813
}

src/main/kotlin/gli_/Storage.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class Storage {
8989
val layerSize = layerSize(0, faces - 1, 0, levels - 1)
9090
val faceSize = faceSize(0, levels - 1)
9191

92-
return layerSize * layer + faceSize * face + (0 until level).sumBy { levelSize(it) }
92+
return layerSize * layer + faceSize * face + (0 until level).sumOf { levelSize(it) }
9393
}
9494

9595
fun imageOffset(coord: Int, extend: Int): Int {
@@ -146,7 +146,7 @@ class Storage {
146146
assert(baseLevel in 0 until levels)
147147
assert(baseLevel <= maxLevel)
148148
// The size of a face is the sum of the size of each level.
149-
return (baseLevel..maxLevel).sumBy { levelSize(it) }
149+
return (baseLevel..maxLevel).sumOf { levelSize(it) }
150150
}
151151

152152
fun layerSize(baseFace: Int, maxFace: Int, baseLevel: Int, maxLevel: Int): Int {

src/main/kotlin/gli_/misc.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import java.net.URI
1010
import java.nio.ByteBuffer
1111
import java.nio.file.Path
1212
import java.nio.file.Paths
13+
import java.util.*
1314
import javax.imageio.ImageIO
1415

1516
infix fun Int.has(b: Int) = (this and b) != 0
@@ -18,7 +19,7 @@ infix fun Int.hasnt(b: Int) = (this and b) == 0
1819
fun pathOf(filename: String, vararg more: String): Path = Paths.get(filename, *more)
1920
//fun URI.toPath(): Path = Paths.get(this)
2021

21-
val Path.extension get() = toString().substringAfterLast(".").toLowerCase()
22+
val Path.extension get() = toString().substringAfterLast(".").lowercase(Locale.getDefault())
2223

2324
fun ByteBuffer.flipY(size: Vec2i) = flipY(size.x, size.y)
2425

0 commit comments

Comments
 (0)