Gradle plugin:
./gradlew publishToMavenLocal
./gradlew publish
Korge Gradle plugin
Home Page: https://korlibs.soywiz.com/korge/
When trying to run the task the following error is thrown:
"The value for task ':runJvm' property 'mainClass' is final and cannot be changed any further."
I have tested the build with gradle 6.3, 6.4 and 6.5 and only after version 6.4 does this error occur.
On creating a brand new Korge Plugin Project on windows 10 Pro x64 in a VM on a mac host.
org.apache.velocity.exception.VelocityException: Error initializing log: Failed to initialize an instance of org.apache.velocity.runtime.log.Log4JLogChute with the current runtime configuration.
at org.apache.velocity.runtime.RuntimeInstance.initializeLog(RuntimeInstance.java:875)
at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:262)
at org.apache.velocity.app.VelocityEngine.init(VelocityEngine.java:93)
at com.soywiz.korge.intellij.util.TemplateExtKt.renderTemplate(TemplateExt.kt:10)
at com.soywiz.korge.intellij.module.KorgeModuleConfig.generate(KorgeModuleConfig.kt:50)
at com.soywiz.korge.intellij.module.KorgeModuleBuilder$setupRootModel$1$1.invokeSuspend(KorgeModuleBuilder.kt:46)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:241)
at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:270)
at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:79)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:54)
at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:36)
at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
at com.soywiz.korge.intellij.module.KorgeModuleBuilder$setupRootModel$1.invoke(KorgeModuleBuilder.kt:45)
at com.soywiz.korge.intellij.module.KorgeModuleBuilder$setupRootModel$1.invoke(KorgeModuleBuilder.kt:18)
at com.soywiz.korge.intellij.util.UtilsKt$backgroundTask$1.run(Utils.kt:100)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:888)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:163)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:585)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:531)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:59)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:150)
at com.intellij.openapi.progress.impl.CoreProgressManager$4.lambda$run$0(CoreProgressManager.java:402)
at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:221)
at com.intellij.openapi.progress.impl.CoreProgressManager$4.run(CoreProgressManager.java:402)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:238)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.apache.velocity.exception.VelocityException: Failed to initialize an instance of org.apache.velocity.runtime.log.Log4JLogChute with the current runtime configuration.
at org.apache.velocity.runtime.log.LogManager.createLogChute(LogManager.java:220)
at org.apache.velocity.runtime.log.LogManager.updateLog(LogManager.java:269)
at org.apache.velocity.runtime.RuntimeInstance.initializeLog(RuntimeInstance.java:871)
... 31 more
Caused by: java.lang.RuntimeException: Error configuring Log4JLogChute :
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at org.apache.velocity.util.ExceptionUtils.createWithCause(ExceptionUtils.java:67)
at org.apache.velocity.util.ExceptionUtils.createRuntimeException(ExceptionUtils.java:45)
at org.apache.velocity.runtime.log.Log4JLogChute.initAppender(Log4JLogChute.java:133)
at org.apache.velocity.runtime.log.Log4JLogChute.init(Log4JLogChute.java:85)
at org.apache.velocity.runtime.log.LogManager.createLogChute(LogManager.java:157)
... 33 more
Caused by: java.io.FileNotFoundException: velocity.log (Zugriff verweigert)
at java.base/java.io.FileOutputStream.open0(Native Method)
at java.base/java.io.FileOutputStream.open(FileOutputStream.java:298)
at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:237)
at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:158)
at org.apache.log4j.FileAppender.setFile(FileAppender.java:294)
at org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java:207)
at org.apache.log4j.FileAppender.<init>(FileAppender.java:110)
at org.apache.log4j.RollingFileAppender.<init>(RollingFileAppender.java:79)
at org.apache.velocity.runtime.log.Log4JLogChute.initAppender(Log4JLogChute.java:118)
... 35 more
Provide a way for a single project to create multiple entry points (runJvm, runJs etc). Also register a class type like JvmExec
That autosets the classpath to the right value
When building iOS target build fails with
error: /../build/combinedResources/resources: No such file or directory (in target 'app-Arm64-Debug' from project 'app')
or more precisely The following build commands failed: PBXCp /../build/combinedResources/resources /../build/platforms/ios/app.xcodeproj/build/Build/Products/Debug-iphoneos/unnamed.app/include/app/resources
This is due to
doFirst {
combinedResourcesFolder.mkdirs()
}
not being triggered in copyIosResources
task. Moving folder creation to configuration stage does not help as gradle marks this directory as stale and deletes it before the PBXCp runs.
Something simple and styllable that doesn't require additional resources to load.
https://kotlinlang.slack.com/archives/CJEF0LB6Y/p1592101482223800
https://gamedevacademy.org/creating-a-preloading-screen-in-phaser-3/?a=13
On windows systems, 0.0.0.0 is unreachable with e.g. Opera and edge.
OS: Mac
Android SDK location on local.properties: sdk.dir=/Users/pablocaviglia/Library/Android/sdk
Gradle task: buildAndroidAar
Exception:
`> Task :prepareAndroidBootstrap FAILED
FAILURE: Build failed with an exception.
java.io.FileNotFoundException: /Users/pablocaviglia/devel/projects/tool_framework_multi_platform/build/platforms/android/local.properties (No such file or directory)
`
The attached image is the structure created when the project got built from scratch (after clean task).
The only way to make it work is to create by hand the following structure:
$project/build/platforms/android/
and by adding a valid local.properties file.
java -jar build/libs/korge-hello-world-all-proguard.jar
screenWidth: 1920, screenHeight: 1080, winX=704, winY=284
VI: native@0x7f0f5446db40, d: native@0x7f0f54431ab0 (com.sun.jna.platform.unix.X11$Display@544399bf), w: 0x4c00001, glc: native@0x7f0f5446ddd0
GL_VENDOR: Intel Open Source Technology Center
GL_VERSION: 3.0 Mesa 19.2.8
keysim: 0x41
Korge gameWindow.loop completed
Exception in thread "main" java.lang.Error: Structure.getFieldOrder() on class com.sun.jna.platform.unix.X11$XAnyEvent does not provide enough names [0] ([]) to match declared fields [5] ([display, send_event, serial, type, window])
at com.sun.jna.Structure.getFields(Unknown Source)
at com.sun.jna.Structure.deriveLayout(Unknown Source)
at com.sun.jna.Structure.calculateSize(Unknown Source)
at com.sun.jna.Structure.allocateMemory(Unknown Source)
at com.sun.jna.Structure.ensureAllocated(Unknown Source)
at com.sun.jna.Structure.ensureAllocated(Unknown Source)
at com.sun.jna.Structure.size(Unknown Source)
at com.sun.jna.Structure.size(Unknown Source)
at com.sun.jna.Native.getNativeSize(Unknown Source)
at com.sun.jna.Structure.getNativeSize(Unknown Source)
at com.sun.jna.Structure.getNativeSize(Unknown Source)
at com.sun.jna.Structure.validateField(Unknown Source)
at com.sun.jna.Structure.validateFields(Unknown Source)
at com.sun.jna.Structure.<init>(Unknown Source)
at com.sun.jna.Structure.<init>(Unknown Source)
at com.sun.jna.Structure.<init>(Unknown Source)
at com.sun.jna.Structure.<init>(Unknown Source)
at com.sun.jna.Union.<init>(Unknown Source)
at com.sun.jna.platform.unix.X11$XEvent.<init>(Unknown Source)
at com.soywiz.korgw.x11.d.a(Unknown Source)
at com.soywiz.h.a.a(Unknown Source)
at com.soywiz.h.a.a(Unknown Source)
at MainKt.main(Unknown Source)
at a.a(Unknown Source)
at a.c.a.d.b_(Unknown Source)
at a.c.b.a.a.a_(Unknown Source)
at a.c.g.a(Unknown Source)
at a.c.b.a.g.a(Unknown Source)
at MainKt.main(Unknown Source)
My project perfectly runs in the JS target in version 1.4.1 but fails in 1.4.2 with these errors:
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (favicon.ico, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (korgw-root-korgw.js, line 0)
[Error] Error: Script error for "korgw-root-korgw", needed by: work-root-korge
http://requirejs.org/docs/errors.html#scripterror
defaultOnError (require.min.js:1:935)
c (require.min.js:1:3260)
onScriptError (require.min.js:1:13218)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (klogger-root-klogger.js.map, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (korim-root-korim.js.map, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (kmem-root-kmem.js.map, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (kds-root-kds.js.map, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (engineEmi.js.map, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (korinject-root-korinject.js.map, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (work-root-korge.js.map, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (korma-root-korma.js.map, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (work-root-korgw.js.map, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (kotlin.js.map, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (klock-root-klock.js.map, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (kbox2d-root-kbox2d.js.map, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (work-root-korge-box2d.js.map, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (korau-root-korau.js.map, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (korio-root-korio.js.map, line 0)
The last part of entrypoint could be capitalized and add a Kt.
Right now:
var entryPoint: String = "main"
var jvmMainClassName: String = "MainKt"
This is because on the JVM we are referencing to a class file
The first time works fine, but updating the code and calling again fails to update. This started to failing later versions so it is a regression. Probably something changed on the kotlin plugin
Hello and thank you for your awesome game engine.
When you apply the plugin in Gradle, the project version is set to "4.10.1". This was very frustrating when using the maven-publish
plugin (the version was always 4.10.1). I'm not a Gradle expert, but it seems a bug to me.
To reproduce the issue, download the korge-hello-world project and add the following lines around apply<KorgeGradlePlugin>()
in build.gradle.kts
:
version = "0.1"
println(version)
apply<KorgeGradlePlugin>()
println(version)
Output is:
> Configure project :
0.1
Kotlin Multiplatform Projects are an experimental feature.
4.10.1
Tested with versions 1.14.0.0 & 1.15.0.0 of the plugin.
The workaround I found is to set the version of the project after applying the plugin.
Lots of them are not consisent
The packagingOptions here misses at least
it.exclude("META-INF/AL2.0")
it.exclude("META-INF/LGPL*")
Please note that these lines (and some other excludes) are present in korge-next in
korge-gradle-plugin/src/main/kotlin/com/soywiz/korge/gradle/KorgeGradlePluginAndroid.kt
Moved from: korlibs/korge#28
I am trying to make a simple game with Korge but I ran into a problem where I can not build for Android target when my game module game depends on another multiplatform module data. Take a look here https://github.com/arnis71/SpaceGame.
It has one data class that I want to use on the backend and in the game called Projectile. It sees this class in game module in IDE and even runs the jvm target. But when I try to start it on android emulator it fails at :android:compileDebugKotlin and says that it can not find this Projectile class.
Possible solution is to include all dependency modules sources to generated build.gradle
@voidpointerdev
Basically put all the assets, which currently need to be in the same folder as the executable, in the executable.
Right now, runJVM
runs ZGC if the Java version is 14+. Not all systems running 14+ support ZGC. For instance, I'm running Windows 8.1, which meets the requirements of Java 14, but when I run runJVM
the task fails with ZGC requires Windows version 1803 or later
.
I tried looking for a way to add a check for ZGC support in Jvm.kt
, but no luck. Could grab the os.name
and os.version
from system properties, but maybe it's better to just modify the check to allow JVM_USE_ZGC
to be explicitly false
?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.