Skip to content

Commit

Permalink
Bump Kotlin and Kor versions
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-arold committed Jan 20, 2024
1 parent 1ddb07a commit 3bb51c8
Show file tree
Hide file tree
Showing 24 changed files with 51 additions and 47 deletions.
3 changes: 0 additions & 3 deletions .github/FUNDING.yml

This file was deleted.

11 changes: 7 additions & 4 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,21 @@

## Must have

- [ ] Implement Rexpaint loading
- [ ] Implement animation loading
- [ ] Add remaining tilesets to app config and test them
- [ ] Retrofit code examples
- [ ] Implement texture transform modifiers (crossed-out, underline, border)
- [ ] Refactor the Markov modifier
- [ ] Fix the text input component
- [ ] Fix the buggy components
- [ ] radio box won't do the `o` when selected without focus (first click)
- [ ] `TextBox` will do an interaction recoloring when `<Space>` is pressed
- [ ] `TextBox` cursor is drawn outside the box
- [ ] if `CheckBox` is clicked quickly it won't check
- [ ] Use all code examples to check for bugs


## Nice to have

- [ ] Implement Rexpaint loading
- [ ] Implement animation loading
- [x] Refactor java-sytle builders to kotlin builder dsls
- [ ] Check the rest of the code for Javaesque patterns and refactor them
- [ ] Make life easier for Java users
Expand Down
4 changes: 2 additions & 2 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ repositories {
}

dependencies {
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.21")
implementation("com.soywiz.korlibs.korge.plugins:korge-gradle-plugin:4.0.7")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.22")
implementation("com.soywiz.korlibs.korge.plugins:korge-gradle-plugin:5.3.0")
}
7 changes: 1 addition & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
group=org.hexworks.zircon
version=2022.1.0-RELEASE
version=2024.0.0-RELEASE

kotlin.mpp.stability.nowarn=true
kotlin.js.compiler=ir

org.gradle.parallel=true
org.gradle.daemon=true
org.gradle.jvmargs=-Xmx3g -XX:MaxPermSize=1g
org.gradle.configureondemand=true

POM_PACKAGING=jar
POM_URL=https://github.com/Hexworks/zircon
POM_SCM_URL=https://github.com/Hexworks/zircon.git
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
35 changes: 22 additions & 13 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand All @@ -80,13 +80,11 @@ do
esac
done

APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

APP_NAME="Gradle"
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -133,22 +131,29 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -193,11 +198,15 @@ if "$cygwin" || "$msys" ; then
done
fi

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Expand Down
1 change: 1 addition & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

Expand Down
6 changes: 3 additions & 3 deletions zircon.core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ kotlin {
withJava()
compilations.all {
kotlinOptions {
apiVersion = "1.5"
languageVersion = "1.5"
jvmTarget = "11"
apiVersion = "1.9"
languageVersion = "1.9"
jvmTarget = "15"
}
}
}
Expand Down
27 changes: 12 additions & 15 deletions zircon.examples/src/commonMain/kotlin/main.kt
Original file line number Diff line number Diff line change
@@ -1,30 +1,27 @@
import korlibs.io.file.std.openAsZip
import org.hexworks.zircon.api.builder.application.appConfig
import org.hexworks.zircon.api.builder.application.withSize
import org.hexworks.zircon.api.createApplication
import org.hexworks.zircon.api.resource.Resource
import org.hexworks.zircon.api.resource.ResourceType
import org.hexworks.zircon.api.resource.loadResource
import org.hexworks.zircon.internal.resource.BuiltInCP437TilesetResource

suspend fun main() {
val tileSize = 16
val gridCols = 1920 / tileSize
val gridRows = 1080 / tileSize

// loadResource(Resource.create("rex_files/xptest.xp", ResourceType.PROJECT)).openAsZip()
//
// println("ok")
loadResource(Resource.create("rex_files/xptest.zip", ResourceType.PROJECT))

// Applications.createApplication(appConfig {
// size = Size.create(gridCols, gridRows)

// createApplication(appConfig {
// withSize {
// width = gridCols
// height = gridRows
// }
// defaultTileset = BuiltInCP437TilesetResource.valueOf("REX_PAINT_${tileSize}X${tileSize}")
// debugMode = true
// }).rex().start()

createApplication(appConfig {
withSize {
width = gridCols
height = gridRows
}
defaultTileset = BuiltInCP437TilesetResource.valueOf("REX_PAINT_${tileSize}X${tileSize}")
debugMode = true
}).components().start()
// }).components().start()

}
Empty file.
Binary file not shown.
Empty file.
Binary file not shown.
Empty file.
Binary file not shown.
Empty file.
Binary file not shown.
Empty file.
Binary file not shown.
Empty file.
Binary file not shown.
Empty file.
Binary file not shown.

0 comments on commit 3bb51c8

Please sign in to comment.