It's hard to be a regulator, and I don't want to offend anyone.
Please follow the steps below.
- Clone this project via Git/GitHub.
- Synchronize the build.gradle.kts.
- Run task
:main:jar
for generating a desktop only mod file. - Run task
:main:deployLocal
for generating a mod file which can work on both desktop and android. But you need an Android SDK at first.
Full Command Line:
# Linux
./gradlew :main:jar
# Windows
gradlew.bat :main:jar
Cyber IO project is separated from several parts.
- main: It's the mian project of Cyber IO. Everything in this project is included in the mod.
- annotations: It contains many annotations Cyber IO used. And it's used to generate codes while compiling.
- processor: It contains some annotation processors.
- app: It's used to start and debug game in IDE.
- bundle: no use yet
- story: no use yet
Cyber IO uses Gradle Kts as DSL of build scripts.
- If a class contains a mutable collection, pool it.
- Use typealias instead of Int, meaningless name, or long name, for embedded more information.
- Use Kotlin style functions as much as you can. Do not use any lambda without inline function.
- Annotate everything you write as much as possible, which provides more meta information for other programmers.
- Use ksp to generate code. And write event subscriber (by @SubscribeEvent and @Subscribe) as near logic as you can.
- Use mutable object in serialization instead of creating them once again.
- Use R.xxx to share global resources.
- Use Var to share global variables
WIP