184 lines
4.7 KiB
Groovy
Executable File
184 lines
4.7 KiB
Groovy
Executable File
buildscript {
|
|
repositories {
|
|
maven { url = 'https://files.minecraftforge.net/maven' }
|
|
jcenter()
|
|
mavenCentral()
|
|
}
|
|
dependencies {
|
|
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
|
|
}
|
|
}
|
|
|
|
plugins {
|
|
id "org.sonarqube" version "3.0"
|
|
}
|
|
|
|
repositories {
|
|
maven {
|
|
url = "https://dvs1.progwml6.com/files/maven/"
|
|
}
|
|
maven {
|
|
url "https://minecraft.curseforge.com/api/maven/"
|
|
}
|
|
}
|
|
|
|
sonarqube {
|
|
properties {
|
|
property "sonar.projectKey", "refinedmods_refinedstorage"
|
|
property "sonar.organization", "refinedmods"
|
|
property "sonar.host.url", "https://sonarcloud.io"
|
|
}
|
|
}
|
|
|
|
apply plugin: 'net.minecraftforge.gradle'
|
|
apply plugin: 'eclipse'
|
|
apply plugin: 'maven-publish'
|
|
|
|
version = '1.9.8'
|
|
def env = System.getenv()
|
|
if (env.BUILD_NUMBER) {
|
|
version = version + "+" + "${env.BUILD_NUMBER}"
|
|
}
|
|
group = 'com.refinedmods'
|
|
archivesBaseName = 'refinedstorage'
|
|
|
|
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'
|
|
|
|
minecraft {
|
|
mappings channel: 'snapshot', version: '20200723-1.16.1'
|
|
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
|
|
|
|
runs {
|
|
client {
|
|
workingDirectory project.file('run')
|
|
property 'forge.logging.markers', ''
|
|
property 'forge.logging.console.level', 'debug'
|
|
mods {
|
|
refinedstorage {
|
|
source sourceSets.main
|
|
}
|
|
}
|
|
}
|
|
|
|
intellijClient {
|
|
parent runs.client
|
|
ideaModule "${project.name}.main"
|
|
environment 'MOD_CLASSES', "${project.file("out/production/resources").canonicalPath};${project.file("out/production/classes").canonicalPath}"
|
|
}
|
|
|
|
server {
|
|
workingDirectory project.file('run')
|
|
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
|
|
property 'forge.logging.console.level', 'debug'
|
|
mods {
|
|
refinedstorage {
|
|
source sourceSets.main
|
|
}
|
|
}
|
|
}
|
|
|
|
data {
|
|
workingDirectory project.file('run')
|
|
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
|
|
property 'forge.logging.console.level', 'debug'
|
|
args '--mod', 'refinedstorage', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources')
|
|
mods {
|
|
refinedstorage {
|
|
source sourceSets.main
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
sourceSets {
|
|
main.resources.srcDirs += 'src/generated/resources'
|
|
}
|
|
|
|
processResources {
|
|
inputs.property 'version', project.version
|
|
|
|
from(sourceSets.main.resources.srcDirs) {
|
|
include 'META-INF/mods.toml'
|
|
|
|
expand 'version': project.version
|
|
}
|
|
|
|
from(sourceSets.main.resources.srcDirs) {
|
|
exclude 'META-INF/mods.toml'
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
minecraft 'net.minecraftforge:forge:1.16.3-34.1.0'
|
|
|
|
compileOnly fg.deobf("mezz.jei:jei-1.16.3:7.3.2.36:api")
|
|
runtimeOnly fg.deobf("mezz.jei:jei-1.16.3:7.3.2.36")
|
|
|
|
compileOnly 'mouse-tweaks:MouseTweaks:2.13:mc1.16.2'
|
|
|
|
runtimeOnly fg.deobf('crafting-tweaks:CraftingTweaks_1.16.2:12.1.0')
|
|
}
|
|
|
|
jar {
|
|
manifest {
|
|
attributes([
|
|
"Specification-Title" : "refinedstorage",
|
|
"Specification-Vendor" : "refinedmods",
|
|
"Specification-Version" : "1",
|
|
"Implementation-Title" : project.name,
|
|
"Implementation-Version" : "${version}",
|
|
"Implementation-Vendor" : "refinedmods",
|
|
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
|
|
])
|
|
}
|
|
}
|
|
|
|
jar.finalizedBy('reobfJar')
|
|
|
|
task apiJar(type: Jar, dependsOn: 'classes') {
|
|
classifier = 'api'
|
|
from(sourceSets.main.output) {
|
|
include 'com/refinedmods/refinedstorage/api/**'
|
|
}
|
|
}
|
|
|
|
task sourcesJar(type: Jar, dependsOn: classes) {
|
|
classifier = 'sources'
|
|
from sourceSets.main.allSource
|
|
}
|
|
|
|
task deobfJar(type:Jar) {
|
|
from sourceSets.main.output
|
|
classifier 'deobf'
|
|
}
|
|
|
|
artifacts {
|
|
archives jar
|
|
archives sourcesJar
|
|
archives deobfJar
|
|
archives apiJar
|
|
}
|
|
|
|
publishing {
|
|
publications {
|
|
mavenJava(MavenPublication) {
|
|
groupId = project.group
|
|
artifactId = project.archivesBaseName
|
|
version = project.version
|
|
artifact jar
|
|
artifact sourcesJar
|
|
artifact deobfJar
|
|
artifact apiJar
|
|
}
|
|
}
|
|
}
|
|
|
|
publishing {
|
|
repositories {
|
|
maven {
|
|
url "/var/www/repo"
|
|
}
|
|
}
|
|
}
|