Files
refinedstorage/build.gradle
2021-12-12 20:28:24 +01:00

176 lines
4.4 KiB
Groovy
Executable File

buildscript {
repositories {
maven { url = 'https://maven.minecraftforge.net' }
mavenCentral()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
}
}
repositories {
maven {
url = "https://dvs1.progwml6.com/files/maven/"
}
maven {
url "https://www.cursemaven.com"
content {
includeGroup "curse.maven"
}
}
maven {
url = "https://maven.theillusivec4.top/"
}
}
apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
apply from: 'https://raw.githubusercontent.com/SizableShrimp/Forge-Class-Remapper/main/classremapper.gradle'
version = '1.10.0'
def env = System.getenv()
if (env.BUILD_NUMBER) {
version = version + "+" + "${env.BUILD_NUMBER}"
}
group = 'com.refinedmods'
archivesBaseName = 'refinedstorage'
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xmaxerrs" << "999"
}
minecraft {
mappings channel: 'official', version: '1.18.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
}
}
}
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
filesMatching('META-INF/mods.toml') {
expand 'version': project.version
}
}
dependencies {
minecraft 'net.minecraftforge:forge:1.18.1-39.0.0'
compileOnly fg.deobf("mezz.jei:jei-1.18.1:9.1.0.41:api")
runtimeOnly fg.deobf("mezz.jei:jei-1.18.1:9.1.0.41")
compileOnly fg.deobf('curse.maven:mouse-tweaks-60089:3546383')
compileOnly fg.deobf('curse.maven:crafting-tweaks-233071:3545611')
runtimeOnly fg.deobf("top.theillusivec4.curios:curios-forge:1.18-5.0.2.4")
compileOnly fg.deobf("top.theillusivec4.curios:curios-forge:1.18-5.0.2.4:api")
}
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
}
test {
useJUnitPlatform()
}
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"
}
}
}