70 lines
1.9 KiB
Groovy
70 lines
1.9 KiB
Groovy
buildscript {
|
|
repositories {
|
|
maven { url = 'https://maven.minecraftforge.net' }
|
|
mavenCentral()
|
|
}
|
|
dependencies {
|
|
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '6.0.+', changing: true
|
|
}
|
|
}
|
|
plugins {
|
|
id 'eclipse'
|
|
id 'idea'
|
|
id 'maven-publish'
|
|
id 'net.minecraftforge.gradle' version '6.0.+'
|
|
}
|
|
|
|
version = findProperty('mod_version') ?: '1.0.0'
|
|
group = findProperty('group') ?: 'com.zern.gunfiresbfix'
|
|
archivesBaseName = findProperty('archives_base_name') ?: 'gunfiresbfix'
|
|
|
|
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
|
|
|
|
println "Java toolchain: ${java.toolchain.languageVersion.get()}"
|
|
|
|
minecraft {
|
|
mappings channel: findProperty('mappings_channel') ?: 'official', version: findProperty('mappings_version') ?: '1.20.1'
|
|
copyIdeResources = true
|
|
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
|
|
}
|
|
|
|
dependencies {
|
|
minecraft "net.minecraftforge:forge:${findProperty('minecraft_version')}-${findProperty('forge_version')}"
|
|
}
|
|
|
|
tasks.named('processResources', DuplicatesStrategy.INCLUDE).configure {
|
|
from(sourceSets.main.resources)
|
|
}
|
|
|
|
mixin {
|
|
add sourceSets.main, 'mixins.gunfiresbfix.refmap.json'
|
|
config 'mixins.gunfiresbfix.json'
|
|
}
|
|
|
|
jar {
|
|
manifest {
|
|
attributes([
|
|
'Specification-Title' : 'gunfiresbfix',
|
|
'Specification-Vendor' : 'Zern',
|
|
'Specification-Version' : '1',
|
|
'Implementation-Title' : project.name,
|
|
'Implementation-Version' : project.jar.archiveVersion,
|
|
'Implementation-Vendor' : 'Zern',
|
|
'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
|
|
])
|
|
}
|
|
}
|
|
|
|
publishing {
|
|
publications {
|
|
register('maven', MavenPublication) {
|
|
from components.java
|
|
}
|
|
}
|
|
repositories {
|
|
maven {
|
|
url "file://${project.projectDir}/mcmodsrepo"
|
|
}
|
|
}
|
|
}
|