NaturesAura/build.gradle

189 lines
5.5 KiB
Groovy
Raw Normal View History

2018-10-13 20:35:18 +02:00
buildscript {
repositories {
2021-12-04 14:51:31 +01:00
// These repositories are only for Gradle plugins, put any other repositories in the repository block further below
maven { url = 'https://maven.minecraftforge.net' }
2019-10-20 22:16:33 +02:00
mavenCentral()
2018-10-13 20:35:18 +02:00
}
dependencies {
2021-12-04 14:51:31 +01:00
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
2018-10-13 20:35:18 +02:00
}
}
2019-10-20 22:16:33 +02:00
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'
2018-10-13 20:35:18 +02:00
2023-03-03 15:32:40 +01:00
version = '38.0'
2019-10-20 22:16:33 +02:00
group = 'de.ellpeck.naturesaura' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'NaturesAura'
2018-10-13 20:35:18 +02:00
if (System.getenv('BUILD_NUMBER') != null) {
version += "." + System.getenv('BUILD_NUMBER')
}
2021-12-04 14:51:31 +01:00
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
2018-10-13 20:35:18 +02:00
2019-10-20 22:16:33 +02:00
minecraft {
2023-01-27 17:02:47 +01:00
mappings channel: 'official', version: '1.19.2'
2018-11-14 21:19:32 +01:00
2019-10-20 22:16:33 +02:00
runs {
client {
workingDirectory project.file('run')
2018-10-13 20:35:18 +02:00
2019-10-20 22:16:33 +02:00
// Recommended logging data for a userdev environment
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
2018-10-13 20:35:18 +02:00
2019-10-20 22:16:33 +02:00
// Recommended logging level for the console
property 'forge.logging.console.level', 'info'
2020-09-22 15:01:16 +02:00
property 'mixin.env.disableRefMap', 'true'
2018-11-23 15:46:08 +01:00
2019-10-20 22:16:33 +02:00
mods {
2020-01-21 23:54:01 +01:00
naturesaura {
2019-10-20 22:16:33 +02:00
source sourceSets.main
}
}
}
2018-11-11 16:50:51 +01:00
2019-10-20 22:16:33 +02:00
server {
workingDirectory project.file('run')
2018-10-13 20:35:18 +02:00
2019-10-20 22:16:33 +02:00
// Recommended logging data for a userdev environment
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
2018-10-13 20:35:18 +02:00
2019-10-20 22:16:33 +02:00
// Recommended logging level for the console
property 'forge.logging.console.level', 'info'
2020-09-22 15:01:16 +02:00
property 'mixin.env.disableRefMap', 'true'
2018-10-13 20:35:18 +02:00
2019-10-20 22:16:33 +02:00
mods {
2020-01-21 23:54:01 +01:00
naturesaura {
2019-10-20 22:16:33 +02:00
source sourceSets.main
}
}
}
2018-10-13 20:35:18 +02:00
2019-10-20 22:16:33 +02:00
data {
workingDirectory project.file('run')
2018-10-13 20:35:18 +02:00
2019-10-20 22:16:33 +02:00
// Recommended logging data for a userdev environment
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
2018-11-14 21:19:32 +01:00
2019-10-20 22:16:33 +02:00
// Recommended logging level for the console
property 'forge.logging.console.level', 'info'
2020-09-22 15:01:16 +02:00
property 'mixin.env.disableRefMap', 'true'
2018-11-14 21:19:32 +01:00
2020-01-29 00:40:28 +01:00
args '--mod', 'naturesaura', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/'), '--existing', file('src/generated/resources')
2018-11-23 15:46:08 +01:00
2019-10-20 22:16:33 +02:00
mods {
2020-01-21 23:54:01 +01:00
naturesaura {
2019-10-20 22:16:33 +02:00
source sourceSets.main
}
}
}
}
}
2020-01-23 16:05:52 +01:00
sourceSets.main.resources {
srcDir 'src/generated/resources'
}
2019-10-20 22:16:33 +02:00
repositories {
maven {
url = "https://dvs1.progwml6.com/files/maven"
}
maven {
url = "https://maven.blamejared.com"
}
2020-01-26 19:26:50 +01:00
maven {
url = "https://maven.theillusivec4.top/"
}
2020-02-07 21:25:22 +01:00
maven {
2020-02-16 15:04:28 +01:00
url = "https://maven.ellpeck.de"
2020-02-07 21:25:22 +01:00
}
2018-11-23 15:40:30 +01:00
}
2019-10-20 22:16:33 +02:00
dependencies {
2023-01-27 17:02:47 +01:00
minecraft 'net.minecraftforge:forge:1.19.2-43.2.0'
2018-11-23 15:40:30 +01:00
2023-01-27 17:02:47 +01:00
compileOnly fg.deobf("mezz.jei:jei-1.19.2-common-api:11.5.0.297")
runtimeOnly fg.deobf("mezz.jei:jei-1.19.2-forge:11.5.0.297")
2018-11-23 15:40:30 +01:00
2023-01-27 17:02:47 +01:00
compileOnly fg.deobf("vazkii.patchouli:Patchouli:1.19.2-77:api")
runtimeOnly fg.deobf("vazkii.patchouli:Patchouli:1.19.2-77")
2020-01-26 19:26:50 +01:00
2022-09-03 12:06:41 +02:00
runtimeOnly fg.deobf("top.theillusivec4.curios:curios-forge:1.19.2-5.1.1.0")
compileOnly fg.deobf("top.theillusivec4.curios:curios-forge:1.19.2-5.1.1.0:api")
2021-12-04 14:51:31 +01:00
// TODO Enchantability
/* compile fg.deobf("quarris.enchantability:Enchantability:11.0.48")*/
2018-11-23 15:40:30 +01:00
}
2019-10-20 22:16:33 +02:00
// Example for how to get properties into the manifest for reading by the runtime..
jar {
manifest {
attributes([
"Specification-Title" : "naturesaura",
"Specification-Vendor" : "Ellpeck",
"Specification-Version" : "1", // We are version 1 of ourselves
"Implementation-Title" : project.name,
"Implementation-Version" : "${version}",
"Implementation-Vendor" : "Ellpeck",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
}
2018-11-23 15:40:30 +01:00
task deobfJar(type: Jar) {
from(sourceSets.main.output)
archiveName = "${baseName}-${version}-deobf.${extension}"
}
task sourcesJar(type: Jar) {
from(sourceSets.main.allSource)
2020-05-19 23:44:33 +02:00
archiveName = "${baseName}-${version}-sources.${extension}"
2019-10-20 22:16:33 +02:00
}
2020-10-17 23:23:21 +02:00
task apiJar(type: Jar) {
from(sourceSets.main.output)
from(sourceSets.main.java)
include("de/ellpeck/naturesaura/api/**")
archiveName = "${baseName}-${version}-api.${extension}"
}
artifacts {
archives deobfJar
archives sourcesJar
2020-10-17 23:23:21 +02:00
archives apiJar
}
2018-11-14 21:19:32 +01:00
publishing {
publications {
mavenJava(MavenPublication) {
groupId project.group
artifactId project.archivesBaseName
version project.version
from components.java
artifact deobfJar {
classifier 'deobf'
}
artifact sourcesJar {
2020-05-19 23:44:33 +02:00
classifier 'sources'
}
2020-10-17 23:23:21 +02:00
artifact apiJar {
classifier 'api'
}
2020-02-07 21:05:26 +01:00
pom.withXml {
def node = asNode()
2020-02-07 21:25:22 +01:00
if (node.dependencies.size() > 0)
2020-02-07 21:05:26 +01:00
node.remove(node.dependencies)
}
2018-11-14 21:19:32 +01:00
}
}
repositories {
maven {
2020-02-16 13:51:56 +01:00
url "file://" + System.getenv("local_maven")
2018-11-14 21:19:32 +01:00
}
}
2020-05-19 23:44:33 +02:00
}