You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I love using this plugin to setup my minecraft plugin projects. In the past I have always used Java, but recently, I switched to Kotlin because I personally like it more and I think it is better.
Would it be possible to add Kotlin support to the options when setting up a project?
krazzbeluh, AppleGamer22, KitsuneDev, cleonyc, davenathanael and 44 morere-ovo, Ayfri, TheFruxz, KitsuneDev, 10Meisterbaelle and 5 morere-ovo, TheFruxz, jcurtis06, Syrent and skuralll
Maybe, depends on when Jetbrain's multi JVM language API work truly gets to a point when it can support it. The issue now is any features written for Java don't work for Kotlin, though that should be changing / is changing due to new API changes Jetbrains is working on. If it's to the point where mcdev features work or only require minor changes to work then it's something to consider possibly.
Alright. It’s not too big of a deal. I just have to recreate my main class as a kotlin class and add maven dependencies for kotlin to set it up, but if it could be automatic, that would we awesome!
I don't see a problem in using Kotlin on a bukkit server, because libraries from e.g. https://dev.bukkit.org/projects/kotlin are adding the "compatibility" directly.
On the contrary, currently it is easier than ever to use the programming language Kotlin in a Java environment!
For comparison, Forge usually has to be installed on the server AND even manually by the user, Kotlin has to be added ONLY as a default plugin by the administrator
Since Kotlin also works directly with Java and refers to it several times, Kotlin is indirectly a Java framework, but I would not go that far :D
It is a fact that nowadays it is not a technical problem to use Kotlin instead of Java or with Java, so that such a feature is important for the current market.
As an example: new Android apps are nowadays also developed natively with Kotlin (problems? NO!)
Since this plugin has unfortunately already 'missed' some new systems, it would be a pity to miss this system as well. For people like me this would be a reason to change to another system or to develop a plugin which offers these basic simple functions and extended support.
And if you need help inserting the Kotlin-Dependency, you can create a community call, maybe even report me yourself.
There is no reason to spam. Lack of kotlin support in the plugin is a technical limitation. If we didn't see the merits of kotlin, do you really think MinecraftDev itself would be written in kotlin?
jamierocks, ArcheCraft, JadeNeoma, otomir23, Emirlol and 1 more
Hello, sorry for replying to an old-ish issue. I'm new to JVM dependency-management world such as Gradle/Maven (coming from JS/Python/Go), and would like to try on developing Spigot plugins.
I'm currently trying to use Kotlin as the language. I understand MinecraftDev currently does not support Kotlin yet, but with the spirit of "getting the minimal workspace right" (what I feel from this project, similar to "bootstraper", boilerplate, scaffolding, generator, etc. from other languages), do you guys have a migration guide for migrating Java-Gradle Spigot plugin MinecraftDev project to use Kotlin? I have looked around at some repositories here on GitHub but seems everyone have their own way to setup the Gradle etc. If that's currently available, or if there's a recommended article/repository that I can refer to, that'd be great, but if there's none currently, that's ok as well. Thanks and cheers :)
I haven't used the MinecraftDev setup in a while, but iirc it sets up your plugin.yml and leaves you with a project structure similar to this: src/main/java // java code would go here
I think they also put a Main class in that directory, which I would delete cause its in java. src/main/resources // plugin.yml, config.yml, etc.
When I do plugins, I just add a folder to that structure at /src/main/kotlin // kotlin code goes here
I also would usually create a new package inside the kotlin folder called dev.jaims.pluginname, but afaik you don't really need to do that.
Inside there you also have to setup your main class. Here is a quick example of what that might look like in Kotlin.
You shouldn't need to change much of the build.gradle, but I've copied a recent one I did for a 1.16 paper plugin.
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.4.0'
id 'com.github.johnrengelman.shadow' version '6.0.0'
}
group 'dev.jaims'
version '1.0'shadowJar {
archiveClassifier.set("")
}
repositories {
mavenCentral()
maven { url 'https://papermc.io/repo/repository/maven-public/' }
maven { url 'https://repo.jaims.dev/repository/maven-releases' }
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib"
implementation 'dev.jaims.mcutils:bukkit:2.1.1'
compileOnly 'com.destroystokyo.paper:paper-api:1.16.1-R0.1-SNAPSHOT'
}
compileKotlin {
kotlinOptions.jvmTarget ="1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget ="1.8"
}
I think the only difference is adding the compileKotlin and compileTestKotlin tasks, as well as the kotlin std lib and kotlin plugin. I also added the shadowJar stuff to be able to shade dependencies.
Hopefully this sorta answered what you were asking, but to sum it all up, I would usually just add the two Kotlin tasks, then start writing code at /src/main/kotlin or similar depending on what your package name is and where in your project its located.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hi everyone! I would love to see full first class support for Kotlin, especially including all the quick fixes and inspections.
Would donations or putting a "bounty" on this issue help dedicating more time/resources, or would it just needlessly increase pressure?
Has there been any work done on this matter and is there some kind of list of things that would have to be implemented (or list of blockers) for this issue to get closed? Maybe if we can all work together then this can be finished.
reeve567, KitsuneDev, otomir23, duranaaron and hozhaireeve567
Activity
DenWav commentedon Jun 16, 2020
Maybe, depends on when Jetbrain's multi JVM language API work truly gets to a point when it can support it. The issue now is any features written for Java don't work for Kotlin, though that should be changing / is changing due to new API changes Jetbrains is working on. If it's to the point where mcdev features work or only require minor changes to work then it's something to consider possibly.
Jaimss commentedon Jun 16, 2020
Alright. It’s not too big of a deal. I just have to recreate my main class as a kotlin class and add maven dependencies for kotlin to set it up, but if it could be automatic, that would we awesome!
SmushyTaco commentedon Jul 6, 2020
+1
TheFruxz commentedon Aug 25, 2020
Problem? NO!
I don't see a problem in using Kotlin on a bukkit server, because libraries from e.g. https://dev.bukkit.org/projects/kotlin are adding the "compatibility" directly.
On the contrary, currently it is easier than ever to use the programming language Kotlin in a Java environment!
For comparison, Forge usually has to be installed on the server AND even manually by the user, Kotlin has to be added ONLY as a default plugin by the administrator
Since Kotlin also works directly with Java and refers to it several times, Kotlin is indirectly a Java framework, but I would not go that far :D
It is a fact that nowadays it is not a technical problem to use Kotlin instead of Java or with Java, so that such a feature is important for the current market.
As an example: new Android apps are nowadays also developed natively with Kotlin (problems? NO!)
Since this plugin has unfortunately already 'missed' some new systems, it would be a pity to miss this system as well. For people like me this would be a reason to change to another system or to develop a plugin which offers these basic simple functions and extended support.
Earthcomputer commentedon Aug 25, 2020
There is no reason to spam. Lack of kotlin support in the plugin is a technical limitation. If we didn't see the merits of kotlin, do you really think MinecraftDev itself would be written in kotlin?
davenathanael commentedon Sep 11, 2020
Hello, sorry for replying to an old-ish issue. I'm new to JVM dependency-management world such as Gradle/Maven (coming from JS/Python/Go), and would like to try on developing Spigot plugins.
I'm currently trying to use Kotlin as the language. I understand MinecraftDev currently does not support Kotlin yet, but with the spirit of "getting the minimal workspace right" (what I feel from this project, similar to "bootstraper", boilerplate, scaffolding, generator, etc. from other languages), do you guys have a migration guide for migrating Java-Gradle Spigot plugin MinecraftDev project to use Kotlin? I have looked around at some repositories here on GitHub but seems everyone have their own way to setup the Gradle etc. If that's currently available, or if there's a recommended article/repository that I can refer to, that'd be great, but if there's none currently, that's ok as well. Thanks and cheers :)
Jaimss commentedon Sep 11, 2020
I haven't used the MinecraftDev setup in a while, but iirc it sets up your plugin.yml and leaves you with a project structure similar to this:
src/main/java
// java code would go hereI think they also put a Main class in that directory, which I would delete cause its in java.
src/main/resources
// plugin.yml, config.yml, etc.When I do plugins, I just add a folder to that structure at
/src/main/kotlin
// kotlin code goes hereI also would usually create a new package inside the kotlin folder called
dev.jaims.pluginname
, but afaik you don't really need to do that.Inside there you also have to setup your main class. Here is a quick example of what that might look like in Kotlin.
You shouldn't need to change much of the build.gradle, but I've copied a recent one I did for a 1.16 paper plugin.
I think the only difference is adding the compileKotlin and compileTestKotlin tasks, as well as the kotlin std lib and kotlin plugin. I also added the shadowJar stuff to be able to shade dependencies.
Hopefully this sorta answered what you were asking, but to sum it all up, I would usually just add the two Kotlin tasks, then start writing code at
/src/main/kotlin
or similar depending on what your package name is and where in your project its located.davenathanael commentedon Sep 12, 2020
Thank you for your suggestion @Jaimss!
stale commentedon Dec 19, 2020
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
7 remaining items
JadeNeoma commentedon Jun 19, 2022
+1
Schmarni-Dev commentedon Jul 15, 2022
+1
mindsolve commentedon Jul 16, 2022
Hi everyone! I would love to see full first class support for Kotlin, especially including all the quick fixes and inspections.
Would donations or putting a "bounty" on this issue help dedicating more time/resources, or would it just needlessly increase pressure?
filename24 commentedon Oct 13, 2022
+1
jcurtis06 commentedon Dec 11, 2022
+1
flowergardn commentedon Jan 7, 2023
+1
Qubilux commentedon Feb 5, 2023
It seems like it throws internal errors when using Kotlin in Architectury mods too.
https://github.com/minecraft-dev/mcdev-error-report/issues/312#issuecomment-1416067901
T3sT3ro commentedon Feb 25, 2023
Has there been any work done on this matter and is there some kind of list of things that would have to be implemented (or list of blockers) for this issue to get closed? Maybe if we can all work together then this can be finished.
FaultyFunctions commentedon May 28, 2024
Any news on adding Kotlin support?
KitsuneDev commentedon Jul 28, 2024
I believe this has been implemented as of the latest update?
Just missing Forge/Architectury templates...
Earthcomputer commentedon Jul 28, 2024
You can PR any missing templates to https://github.com/minecraft-dev/templates
KitsuneDev commentedon Jul 28, 2024
Should this issue be closed then, as Kotlin support is already implemented?
RedNesto commentedon Jul 28, 2024
Kotlin support is more than just the creator, I'm working on supporting event listener generation for example.