Add a Jenkinsfile and a few other things
This commit is contained in:
parent
184d1f7f8f
commit
2b785ee9a2
|
@ -0,0 +1,23 @@
|
|||
pipeline {
|
||||
agent any
|
||||
|
||||
triggers {
|
||||
pollSCM('*/10 * * * *')
|
||||
}
|
||||
stages {
|
||||
stage('Build') {
|
||||
steps {
|
||||
echo 'Building..'
|
||||
sh './gradlew publishToMavenLocal --stacktrace'
|
||||
}
|
||||
}
|
||||
stage('Deploy') {
|
||||
steps {
|
||||
echo 'Deploying....'
|
||||
dir('remappedJars') {
|
||||
archiveArtifacts artifacts:'*.jar', fingerprint: false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -73,9 +73,9 @@ allprojects {
|
|||
val shadowTask = getByName("shadowJar") as ShadowJar
|
||||
dependsOn(shadowTask)
|
||||
archiveBaseName.set(shadowTask.archiveBaseName)
|
||||
if (!archiveBaseName.get().contains("common")) destinationDirectory.set(file("$rootDir/remappedJars"))
|
||||
input.set(shadowTask.archiveFile)
|
||||
archiveClassifier.set(this@allprojects.name)
|
||||
if (!archiveFileName.get().contains("common")) destinationDirectory.set(file("$rootDir/remappedJars"))
|
||||
}
|
||||
withType(ProcessResources::class) {
|
||||
val modVersionPair: Pair<String, String> = "mod_version" to (rootProject.version as String)
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
package fr.username404.snowygui
|
||||
|
||||
import net.minecraft.client.gui.screens.Screen
|
||||
import net.minecraft.network.chat.TranslatableComponent
|
||||
|
||||
abstract class SnowyConfigScreen: Screen(TranslatableComponent("snowygui.config")) {
|
||||
|
||||
}
|
|
@ -13,7 +13,7 @@ object Groups {
|
|||
architectury { platformSetupLoomIde(); fabric() }
|
||||
|
||||
dependencies {
|
||||
modApi("${Groups.Fabric}:fabric-loader:${rootProject.property("fabric_loader_version")}")
|
||||
modImplementation("${Groups.Fabric}:fabric-loader:${rootProject.property("fabric_loader_version")}")
|
||||
modApi("${Groups.FabricApi}:fabric-resource-loader-v0:${rootProject.property("fabric_resource_loader_version")}")
|
||||
include("${Groups.FabricApi}:fabric-resource-loader-v0:${rootProject.property("fabric_resource_loader_version")}") { isTransitive = false }
|
||||
modRuntime(modCompileOnly("com.terraformersmc:modmenu:${rootProject.property("modmenu_version")}") {
|
||||
|
|
|
@ -2,13 +2,13 @@ package fr.username404.snowygui.fabric
|
|||
|
||||
import com.terraformersmc.modmenu.api.ConfigScreenFactory
|
||||
import com.terraformersmc.modmenu.api.ModMenuApi
|
||||
import fr.username404.snowygui.config.SnowyConfigScreen
|
||||
import net.minecraft.client.gui.screens.Screen
|
||||
import net.minecraft.network.chat.TranslatableComponent
|
||||
|
||||
class ModMenuConf: ModMenuApi {
|
||||
override fun getModConfigScreenFactory(): ConfigScreenFactory<Screen> {
|
||||
return ConfigScreenFactory<Screen> { screen: Screen? ->
|
||||
object : Screen(TranslatableComponent("snowygui.config")) { // TODO Actual config screen
|
||||
object : SnowyConfigScreen() { // TODO Actual config screen
|
||||
override fun onClose() {
|
||||
minecraft!!.setScreen(screen)
|
||||
}
|
||||
|
|
|
@ -1,11 +1,26 @@
|
|||
package fr.username404.snowygui.forge
|
||||
|
||||
import fr.username404.snowygui.CommonSnow
|
||||
import fr.username404.snowygui.config.SnowyConfigScreen
|
||||
import net.minecraftforge.fml.ExtensionPoint
|
||||
import net.minecraftforge.fml.ModLoadingContext
|
||||
import net.minecraftforge.fml.common.Mod
|
||||
import java.util.function.BiFunction
|
||||
import java.util.function.Supplier
|
||||
|
||||
@Mod("snowygui")
|
||||
class ForgeInit: CommonSnow() {
|
||||
init {
|
||||
atInit()
|
||||
ModLoadingContext.get().registerExtensionPoint(
|
||||
ExtensionPoint.CONFIGGUIFACTORY,
|
||||
Supplier {
|
||||
return@Supplier BiFunction { mc, screen ->
|
||||
return@BiFunction object : SnowyConfigScreen() {
|
||||
override fun onClose() { mc.setScreen(screen) }
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue