69 lines
1.8 KiB
Groovy
69 lines
1.8 KiB
Groovy
buildscript {
|
|
repositories {
|
|
// These repositories are only for Gradle plugins, put any other repositories in the repository block further below
|
|
maven { url = 'https://maven.minecraftforge.net' }
|
|
gradlePluginPortal()
|
|
mavenCentral()
|
|
}
|
|
dependencies {
|
|
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
|
|
}
|
|
}
|
|
|
|
plugins {
|
|
id 'eclipse'
|
|
id 'maven-publish'
|
|
}
|
|
|
|
apply plugin: 'net.minecraftforge.gradle'
|
|
|
|
version = '1.0.0'
|
|
group = 'com.example.pvpmod'
|
|
archivesBaseName = 'pvpmod'
|
|
|
|
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
|
|
|
|
minecraft {
|
|
mappings channel: 'official', version: '1.20.1'
|
|
|
|
runs {
|
|
client {
|
|
workingDirectory project.file('run')
|
|
property 'forge.logging.markers', 'REGISTRIES'
|
|
property 'forge.logging.console.level', 'debug'
|
|
mods {
|
|
pvpmod {
|
|
source sourceSets.main
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
// Put repositories for dependencies here
|
|
// ForgeGradle automatically adds the Forge maven and Maven Central for you
|
|
|
|
// If you have mod jar dependencies in ./libs, you can declare them as a repository like so:
|
|
// flatDir {
|
|
// dir 'libs'
|
|
// }
|
|
}
|
|
|
|
dependencies {
|
|
minecraft 'net.minecraftforge:forge:1.20.1-47.2.0'
|
|
}
|
|
|
|
jar {
|
|
manifest {
|
|
attributes([
|
|
"Specification-Title": "PvP Mod",
|
|
"Specification-Vendor": "Example",
|
|
"Specification-Version": "1",
|
|
"Implementation-Title": project.name,
|
|
"Implementation-Version": "${version}",
|
|
"Implementation-Vendor": "Example",
|
|
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
|
|
])
|
|
}
|
|
} |