Skip to content

Commit

Permalink
Generate run configuration automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
JustRed23 authored and Hexeption committed Feb 17, 2022
1 parent 283600d commit 6c822ad
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,20 @@ buildscript {
mavenLocal()
maven { url = 'https://maven.minecraftforge.net' }
mavenCentral()
gradlePluginPortal()
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:5+'
classpath "gradle.plugin.org.jetbrains.gradle.plugin.idea-ext:gradle-idea-ext:1.1.3"
}
}

import net.minecraftforge.forge.tasks.*
import org.jetbrains.gradle.ext.*

apply plugin: 'eclipse'
apply plugin: 'net.minecraftforge.gradle.patcher'
apply plugin: "org.jetbrains.gradle.plugin.idea-ext"

println(' Java: ' + System.getProperty('java.version') +
' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ')' +
Expand Down Expand Up @@ -111,3 +115,13 @@ task copyAssets {
into 'run/assets'
}
}

idea.project.settings {
runConfigurations {
"Minecraft"(Application) {
mainClass = 'mcp.client.Start'
workingDirectory = "$projectDir/run"
moduleName = idea.module.name + '.main'
}
}
}

0 comments on commit 6c822ad

Please sign in to comment.