From d86d1dab91376ea944de5e9387a20575b50ccf1c Mon Sep 17 00:00:00 2001 From: thedarkcolour <30441001+thedarkcolour@users.noreply.github.com> Date: Fri, 29 May 2020 12:46:32 -0700 Subject: Kotlin for Forge 1.2.2 --- build.gradle | 60 ++++-- changelog.txt | 26 +++ index.html | 8 +- .../thedarkcolour/kotlinforforge/ExampleMod.kt | 80 +++++++ .../kotlin/thedarkcolour/kotlinforforge/package.md | 7 + .../thedarkcolour/kotlinforforge/proxy/Proxies.kt | 20 ++ .../thedarkcolour/kotlinforforge/proxy/package.md | 12 ++ .../kotlinforforge/AutoKotlinEventBusSubscriber.kt | 60 +++--- .../thedarkcolour/kotlinforforge/KotlinForForge.kt | 14 +- .../kotlinforforge/KotlinLanguageProvider.kt | 38 ++-- .../kotlinforforge/KotlinModContainer.kt | 62 ++++-- .../kotlinforforge/KotlinModLoadingContext.kt | 16 +- .../kotlinforforge/eventbus/KotlinEventBus.kt | 46 ++-- .../kotlinforforge/eventbus/package.md | 2 + .../thedarkcolour/kotlinforforge/forge/Forge.kt | 169 ++++++++++++++- .../thedarkcolour/kotlinforforge/forge/package.md | 11 + .../thedarkcolour/kotlinforforge/kotlin/Kotlin.kt | 85 ++++++++ .../thedarkcolour/kotlinforforge/kotlin/package.md | 6 + .../kotlin/thedarkcolour/kotlinforforge/package.md | 2 + .../kotlinforforge/webgenerator/WebGenerator.kt | 68 ------ src/main/resources/META-INF/mods.toml | 6 +- src/main/resources/pack.mcmeta | 5 +- .../kotlinforforge/1.0.0/kotlinforforge-1.0.0.pom | 101 ++++----- thedarkcolour/kotlinforforge/1.0.0/web.html | 8 +- .../kotlinforforge/1.0.1/kotlinforforge-1.0.1.pom | 101 ++++----- thedarkcolour/kotlinforforge/1.0.1/web.html | 8 +- .../kotlinforforge/1.1.0/kotlinforforge-1.1.0.pom | 101 ++++----- thedarkcolour/kotlinforforge/1.1.0/web.html | 8 +- .../kotlinforforge/1.2.0/kotlinforforge-1.2.0.pom | 115 +++++----- thedarkcolour/kotlinforforge/1.2.0/web.html | 8 +- .../kotlinforforge/1.2.1/kotlinforforge-1.2.1.pom | 115 +++++----- thedarkcolour/kotlinforforge/1.2.1/web.html | 8 +- .../1.2.2/kotlinforforge-1.2.2-sources.jar | Bin 0 -> 15773 bytes .../1.2.2/kotlinforforge-1.2.2-sources.jar.md5 | 1 + .../1.2.2/kotlinforforge-1.2.2-sources.jar.sha1 | 1 + .../kotlinforforge/1.2.2/kotlinforforge-1.2.2.jar | Bin 0 -> 77158 bytes .../1.2.2/kotlinforforge-1.2.2.jar.md5 | 1 + .../1.2.2/kotlinforforge-1.2.2.jar.sha1 | 1 + .../kotlinforforge/1.2.2/kotlinforforge-1.2.2.pom | 60 ++++++ .../1.2.2/kotlinforforge-1.2.2.pom.md5 | 1 + .../1.2.2/kotlinforforge-1.2.2.pom.sha1 | 1 + thedarkcolour/kotlinforforge/1.2.2/web.html | 20 ++ thedarkcolour/kotlinforforge/web.html | 8 +- thedarkcolour/style.css | 240 ++++++++++----------- thedarkcolour/web.html | 7 +- 45 files changed, 1111 insertions(+), 606 deletions(-) create mode 100644 changelog.txt create mode 100644 src/example/kotlin/thedarkcolour/kotlinforforge/ExampleMod.kt create mode 100644 src/example/kotlin/thedarkcolour/kotlinforforge/package.md create mode 100644 src/example/kotlin/thedarkcolour/kotlinforforge/proxy/Proxies.kt create mode 100644 src/example/kotlin/thedarkcolour/kotlinforforge/proxy/package.md create mode 100644 src/main/kotlin/thedarkcolour/kotlinforforge/eventbus/package.md create mode 100644 src/main/kotlin/thedarkcolour/kotlinforforge/forge/package.md create mode 100644 src/main/kotlin/thedarkcolour/kotlinforforge/kotlin/Kotlin.kt create mode 100644 src/main/kotlin/thedarkcolour/kotlinforforge/kotlin/package.md create mode 100644 src/main/kotlin/thedarkcolour/kotlinforforge/package.md delete mode 100644 src/main/kotlin/thedarkcolour/kotlinforforge/webgenerator/WebGenerator.kt create mode 100644 thedarkcolour/kotlinforforge/1.2.2/kotlinforforge-1.2.2-sources.jar create mode 100644 thedarkcolour/kotlinforforge/1.2.2/kotlinforforge-1.2.2-sources.jar.md5 create mode 100644 thedarkcolour/kotlinforforge/1.2.2/kotlinforforge-1.2.2-sources.jar.sha1 create mode 100644 thedarkcolour/kotlinforforge/1.2.2/kotlinforforge-1.2.2.jar create mode 100644 thedarkcolour/kotlinforforge/1.2.2/kotlinforforge-1.2.2.jar.md5 create mode 100644 thedarkcolour/kotlinforforge/1.2.2/kotlinforforge-1.2.2.jar.sha1 create mode 100644 thedarkcolour/kotlinforforge/1.2.2/kotlinforforge-1.2.2.pom create mode 100644 thedarkcolour/kotlinforforge/1.2.2/kotlinforforge-1.2.2.pom.md5 create mode 100644 thedarkcolour/kotlinforforge/1.2.2/kotlinforforge-1.2.2.pom.sha1 create mode 100644 thedarkcolour/kotlinforforge/1.2.2/web.html diff --git a/build.gradle b/build.gradle index 5686edf..d9b563e 100644 --- a/build.gradle +++ b/build.gradle @@ -8,7 +8,8 @@ buildscript { } dependencies { classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlin_version}" + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + classpath 'org.jetbrains.dokka:dokka-gradle-plugin:0.10.1' } } plugins { @@ -17,8 +18,9 @@ plugins { apply plugin: 'net.minecraftforge.gradle' apply plugin: 'kotlin' +apply plugin: 'org.jetbrains.dokka' -version = '1.2.1' +version = "1.2.2" group = 'thedarkcolour.kotlinforforge' archivesBaseName = 'kotlinforforge' @@ -40,7 +42,7 @@ minecraft { } server { - workingDirectory project.file('run') + workingDirectory project.file('run/server') property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' @@ -62,17 +64,21 @@ minecraft { repositories { mavenCentral() maven { - name = "Yarn Mappings" - url = "https://maven.tterrag.com/" + name = 'Yarn Mappings' + url = 'https://maven.tterrag.com/' + } + maven { + name = 'Kotlin Early Access' + url = 'https://dl.bintray.com/kotlin/kotlin-eap' } maven { - name = "Kotlin Early Access" - url = "https://dl.bintray.com/kotlin/kotlin-eap" + name = 'Dokka' + url = 'https://dl.bintray.com/kotlin/dokka' } } dependencies { - minecraft 'net.minecraftforge:forge:1.15.2-31.1.14' + minecraft 'net.minecraftforge:forge:1.15.2-31.2.5' compile group: "org.jetbrains.kotlin", name: "kotlin-stdlib", version: kotlin_version compile group: "org.jetbrains.kotlin", name: "kotlin-stdlib-jdk7", version: kotlin_version @@ -81,30 +87,24 @@ dependencies { compile group: "org.jetbrains", name: "annotations", version: annotations_version compile group: "org.jetbrains.kotlinx", name: "kotlinx-coroutines-core", version: coroutines_version compile group: "org.jetbrains.kotlinx", name: "kotlinx-coroutines-jdk8", version: coroutines_version - - // Used to generate html files - compile group: 'org.jsoup', name: 'jsoup', version: '1.11.3' } shadowJar { classifier = "obf" dependencies { - include(dependency("org.jetbrains.kotlin:kotlin-stdlib:${kotlin_version}")) - include(dependency("org.jetbrains.kotlin:kotlin-stdlib-jdk7:${kotlin_version}")) - include(dependency("org.jetbrains.kotlin:kotlin-stdlib-jdk8:${kotlin_version}")) - include(dependency("org.jetbrains.kotlin:kotlin-reflect:${kotlin_version}")) - include(dependency("org.jetbrains:annotations:${annotations_version}")) - include(dependency("org.jetbrains.kotlinx:kotlinx-coroutines-core:${coroutines_version}")) - include(dependency("org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:${coroutines_version}")) + include dependency("org.jetbrains.kotlin:kotlin-stdlib:${kotlin_version}") + include dependency("org.jetbrains.kotlin:kotlin-stdlib-jdk7:${kotlin_version}") + include dependency("org.jetbrains.kotlin:kotlin-stdlib-jdk8:${kotlin_version}") + include dependency("org.jetbrains.kotlin:kotlin-reflect:${kotlin_version}") + include dependency("org.jetbrains:annotations:${annotations_version}") + include dependency("org.jetbrains.kotlinx:kotlinx-coroutines-core:${coroutines_version}") + include dependency("org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:${coroutines_version}") } } jar { manifest { - attributes([ - "FMLModType": "LANGPROVIDER" - ]) - + attributes(["FMLModType": "LANGPROVIDER"]) attributes([ "Specification-Title": "Mod Language Provider", "Specification-Vendor": "Forge", @@ -119,11 +119,25 @@ jar { compileKotlin { kotlinOptions { - freeCompilerArgs = ["-Xinline-classes"] jvmTarget = '1.8' } // Required to run in dev environment copy { from "$buildDir/classes/kotlin/main" into "$buildDir/classes/java/main" } +} + +kotlinSourcesJar { + from(sourceSets.main.kotlin.srcDirs) +} + +dokka { + outputFormat = 'html' + outputDirectory = "$buildDir/dokka" + + configuration { + reportUndocumented = true + + samples = ["$rootDir/src/test/kotlin/thedarkcolour/kotlinforforge/ExampleMod.kt".toString()] + } } \ No newline at end of file diff --git a/changelog.txt b/changelog.txt new file mode 100644 index 0000000..3f38229 --- /dev/null +++ b/changelog.txt @@ -0,0 +1,26 @@ +Kotlin for Forge 1.2.2 +- Added a sided delegate class that returns a "client value" on the client side and a "server value" on the server side. +- Added a new utility file called "Kotlin.kt" that provides a few utility functions not related to Minecraft Forge. +- Added an example mod. I will make a template GitHub repository for Kotlin for Forge soon. +- Adjusted mod construction to accurately report exceptions in @Mod object initializers +- Restructured Kotlin for Forge code to use Kotlin APIs whenever possible +- Added styling to the maven repo + +Kotlin for Forge 1.2.1 +- Added backwards compatibility to mods that used versions of Kotlin for Forge before 1.2.0 + +Kotlin for Forge 1.2.0 +- Added a Kotlin implementation of the Forge EventBus that has working addListener and addGenericListener functions +- Added an overload of addGenericListener that uses a reified type parameter instead of a class parameter. +- Updated to Kotlin 1.4M1 + +Kotlin for Forge 1.1.0 +- Events now properly fire through KotlinModContainer +- Updated to Kotlin 1.3.70 Updated to coroutines 1.3.4 Updated to Jetbrains annotation 19.0.0 + +Kotlin for Forge 1.0.1 +- Fixed an issue with language extensions +- Fixed an internal crash + +Kotlin for Forge 1.0.0 +- Initial release for 1.14 and 1.15 \ No newline at end of file diff --git a/index.html b/index.html index be78025..44bd61a 100644 --- a/index.html +++ b/index.html @@ -2,7 +2,11 @@
../ ++Index of /thedarkcolour/
+
+../ thedarkcolour -
+