Updated to Kotlin 1.5.30, Annotations 22.0.0 and Coroutines 1.5.2
This commit is contained in:
parent
39ba21402e
commit
ef45e5b7fd
86
build.gradle
86
build.gradle
|
@ -1,86 +0,0 @@
|
||||||
buildscript {
|
|
||||||
repositories {
|
|
||||||
maven { url = 'https://files.minecraftforge.net/maven' }
|
|
||||||
jcenter()
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
dependencies {
|
|
||||||
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '4.+', changing: true
|
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlin_version}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
plugins {
|
|
||||||
id "maven"
|
|
||||||
id "com.github.johnrengelman.shadow" version "5.2.0"
|
|
||||||
}
|
|
||||||
|
|
||||||
apply plugin: "kotlin"
|
|
||||||
apply plugin: 'net.minecraftforge.gradle'
|
|
||||||
|
|
||||||
version = mod_version
|
|
||||||
|
|
||||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
||||||
targetCompatibility = JavaVersion.VERSION_1_8
|
|
||||||
|
|
||||||
minecraft {
|
|
||||||
mappings channel: 'stable', version: '39-1.12'
|
|
||||||
}
|
|
||||||
|
|
||||||
sourceSets.main.resources { srcDir 'src/generated/resources' }
|
|
||||||
|
|
||||||
repositories {
|
|
||||||
jcenter()
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
minecraft 'net.minecraftforge:forge:1.12.2-14.23.5.2855'
|
|
||||||
compile group: "org.jetbrains.kotlin", name: "kotlin-stdlib", version: kotlin_version
|
|
||||||
compile group: "org.jetbrains.kotlin", name: "kotlin-stdlib-jdk7", version: kotlin_version
|
|
||||||
compile group: "org.jetbrains.kotlin", name: "kotlin-stdlib-jdk8", version: kotlin_version
|
|
||||||
compile group: "org.jetbrains.kotlin", name: "kotlin-reflect", version: kotlin_version
|
|
||||||
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
|
|
||||||
}
|
|
||||||
|
|
||||||
jar {
|
|
||||||
manifest {
|
|
||||||
attributes "FMLCorePlugin": "net.shadowfacts.forgelin.preloader.ForgelinPlugin",
|
|
||||||
"FMLCorePluginContainsFMLMod": "true"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
shadowJar {
|
|
||||||
classifier = ""
|
|
||||||
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}"))
|
|
||||||
}
|
|
||||||
manifest {
|
|
||||||
attributes "FMLCorePlugin": "net.shadowfacts.forgelin.preloader.ForgelinPlugin",
|
|
||||||
"FMLCorePluginContainsFMLMod": "true"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.build.dependsOn shadowJar
|
|
||||||
|
|
||||||
artifacts {
|
|
||||||
archives shadowJar
|
|
||||||
}
|
|
||||||
|
|
||||||
reobf {
|
|
||||||
shadowJar {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.reobfShadowJar.mustRunAfter shadowJar
|
|
||||||
tasks.build.dependsOn reobfShadowJar
|
|
||||||
|
|
||||||
jar.finalizedBy('reobfJar')
|
|
|
@ -0,0 +1,106 @@
|
||||||
|
import net.minecraftforge.gradle.userdev.UserDevExtension
|
||||||
|
|
||||||
|
val modName: String by ext.properties
|
||||||
|
val modGroup: String by ext.properties
|
||||||
|
val modVersion: String by ext.properties
|
||||||
|
val mcVersion: String by ext.properties
|
||||||
|
val mcpChannel: String by ext.properties
|
||||||
|
val mcpVersion: String by ext.properties
|
||||||
|
val forgeVersion: String by ext.properties
|
||||||
|
val repositoryLink: String by ext.properties
|
||||||
|
val kotlinVersion: String by ext.properties
|
||||||
|
val annotationsVersion: String by ext.properties
|
||||||
|
val coroutinesVersion: String by ext.properties
|
||||||
|
val modDescription: String = "Kotlin helper library for Minecraft Forge."
|
||||||
|
|
||||||
|
buildscript {
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
maven(url = "https://maven.minecraftforge.net/")
|
||||||
|
}
|
||||||
|
dependencies {
|
||||||
|
classpath("net.minecraftforge.gradle:ForgeGradle:5.1.+") {
|
||||||
|
isChanging = true
|
||||||
|
}
|
||||||
|
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.30")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
java
|
||||||
|
kotlin("jvm") version "1.5.30"
|
||||||
|
id("net.kyori.blossom") version "1.3.0"
|
||||||
|
id("com.github.johnrengelman.shadow") version "7.0.0"
|
||||||
|
}
|
||||||
|
|
||||||
|
apply(plugin = "net.minecraftforge.gradle")
|
||||||
|
|
||||||
|
version = modVersion
|
||||||
|
group = modGroup
|
||||||
|
|
||||||
|
java.sourceCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
java.targetCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
|
||||||
|
configure<UserDevExtension> {
|
||||||
|
|
||||||
|
mappings(mcpChannel, mcpVersion)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
|
||||||
|
val minecraft by configurations
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
minecraft("net.minecraftforge:forge:$forgeVersion")
|
||||||
|
shadow("org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion")
|
||||||
|
shadow("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion")
|
||||||
|
shadow("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion")
|
||||||
|
shadow("org.jetbrains:annotations:$annotationsVersion")
|
||||||
|
shadow("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion")
|
||||||
|
shadow("org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:$coroutinesVersion")
|
||||||
|
}
|
||||||
|
|
||||||
|
blossom {
|
||||||
|
replaceTokenIn("src/main/kotlin/net/shadowfacts/forgelin/Forgelin.kt")
|
||||||
|
replaceToken("@version@", modVersion)
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks {
|
||||||
|
|
||||||
|
shadowJar {
|
||||||
|
archiveBaseName.set(modName)
|
||||||
|
archiveClassifier.set("")
|
||||||
|
archiveVersion.set(modVersion)
|
||||||
|
configurations = listOf(project.configurations.shadow.get())
|
||||||
|
|
||||||
|
exclude("module-info.class", "META-INF/maven/**", "META-INF/proguard/**", "META-INF/versions/**")
|
||||||
|
|
||||||
|
finalizedBy("reobfJar")
|
||||||
|
}
|
||||||
|
|
||||||
|
artifacts {
|
||||||
|
archives(shadowJar)
|
||||||
|
shadow(shadowJar)
|
||||||
|
}
|
||||||
|
|
||||||
|
processResources {
|
||||||
|
filesMatching("mcmod.info") {
|
||||||
|
expand(
|
||||||
|
"version" to modVersion,
|
||||||
|
"mcversion" to mcVersion,
|
||||||
|
"modname" to modName,
|
||||||
|
"modid" to modName.toLowerCase(),
|
||||||
|
"modname" to modName,
|
||||||
|
"link" to repositoryLink,
|
||||||
|
"description" to modDescription,
|
||||||
|
"authorList" to arrayOf("shadowfacts", "Licious" )
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -1,7 +1,11 @@
|
||||||
mod_version = 1.9.0
|
modGroup=net.shadowfacts
|
||||||
group = net.shadowfacts
|
modVersion=1.9.1
|
||||||
archivesBaseName = Forgelin
|
modName=Forgelin
|
||||||
|
mcVersion=1.12.2
|
||||||
kotlin_version = 1.5.21
|
mcpChannel=stable
|
||||||
annotations_version = 21.0.1
|
mcpVersion=39-1.12
|
||||||
coroutines_version = 1.5.0
|
repositoryLink=https://github.com/Licious17/Forgelin
|
||||||
|
forgeVersion=1.12.2-14.23.5.2855
|
||||||
|
kotlinVersion = 1.5.30
|
||||||
|
annotationsVersion = 22.0.0
|
||||||
|
coroutinesVersion = 1.5.2
|
||||||
|
|
|
@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.1-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
|
||||||
|
|
|
@ -14,7 +14,7 @@ object Forgelin {
|
||||||
|
|
||||||
const val MOD_ID = "forgelin"
|
const val MOD_ID = "forgelin"
|
||||||
const val NAME = "Forgelin"
|
const val NAME = "Forgelin"
|
||||||
const val VERSION = "1.9.0"
|
const val VERSION = "@version@"
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
fun onPreInit(event: FMLPreInitializationEvent) {
|
fun onPreInit(event: FMLPreInitializationEvent) {
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"modid": "forgelin",
|
"modid": "$modid",
|
||||||
"name": "Shadowfacts' Forgelin",
|
"name": "$modname",
|
||||||
"version": "$version",
|
"version": "$version",
|
||||||
"mcversion": "$mcversion",
|
"mcversion": "$mcversion",
|
||||||
"description": "Kotlin helper library for Forge.",
|
"description": "$description",
|
||||||
"credits": "Emberwalker, for the original Forgelin",
|
"credits": "Emberwalker, for the original Forgelin",
|
||||||
"url": "https://github.com/shadowfacts/Forgelin",
|
"url": "$link",
|
||||||
"updateUrl": "",
|
"updateUrl": "",
|
||||||
"authorList": [ "shadowfacts" ],
|
"authorList": "$authorList",
|
||||||
"screenshots": []
|
"screenshots": []
|
||||||
}
|
}
|
||||||
]
|
]
|
Loading…
Reference in New Issue