HEAddons/build.gradle
2022-11-13 00:13:58 -06:00

108 lines
3.4 KiB
Groovy

buildscript {
repositories {
maven { url = 'https://files.minecraftforge.net/maven' }
maven { url = 'https://plugins.gradle.org/m2/' }
jcenter()
mavenCentral()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
}
dependencies {
classpath "gradle.plugin.com.matthewprenger:CurseGradle:1.4.0"
}
}
apply plugin: 'net.minecraftforge.gradle'
// Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
apply plugin: 'com.matthewprenger.cursegradle'
group = 'com.oitsjustjose.headdons' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "HE-Addons-${game_version}-${mod_version}"
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch'))
minecraft {
mappings channel: 'official', version: "${game_version}"
runs {
client {
workingDirectory project.file('run')
property 'forge.logging.console.level', 'debug'
mods {
vtweaks {
source sourceSets.main
}
}
}
server {
workingDirectory project.file('run')
property 'forge.logging.console.level', 'debug'
mods {
vtweaks {
source sourceSets.main
}
}
}
}
}
repositories {
maven { url = "https://dvs1.progwml6.com/files/maven" }
maven { url = 'https://maven.covers1624.net' }
}
dependencies {
minecraft "net.minecraftforge:forge:${game_version}-${forge_version}"
implementation fg.deobf("com.teamcofh:cofh_core:${game_version}-${cofh_core_version}")
implementation fg.deobf("com.teamcofh:thermal_foundation:${game_version}-${thermal_foundation_version}")
implementation fg.deobf("com.teamcofh:thermal_expansion:${game_version}-${thermal_expansion_version}")
}
// Example for how to get properties into the manifest for reading by the runtime..
jar {
manifest {
attributes([
"Specification-Title": "he-addons",
"Specification-Vendor": "oitsjustjose.com",
"Specification-Version": "1", // We are version 1 of ourselves
"Implementation-Title": project.name,
"Implementation-Version": "${mod_version}",
"Implementation-Vendor" :"oitsjustjose.com",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
}
// Example configuration to allow publishing using the maven-publish task
// we define a custom artifact that is sourced from the reobfJar output task
// and then declare that to be published
// Note you'll need to add a repository here
def reobfFile = file("$buildDir/reobfJar/output.jar")
def reobfArtifact = artifacts.add('default', reobfFile) {
type 'jar'
builtBy 'reobfJar'
}
task deobfJar(type: Jar) {
from sourceSets.main.output
classifier = 'Deobf'
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'Sources'
from sourceSets.main.allSource
}
artifacts {
archives deobfJar
archives sourcesJar
}