2014-11-07 14:19:05 +01:00
|
|
|
buildscript {
|
|
|
|
repositories {
|
2021-08-22 17:09:06 +02:00
|
|
|
maven { url = 'https://maven.minecraftforge.net' }
|
2021-02-26 22:15:48 +01:00
|
|
|
mavenCentral()
|
2021-08-22 23:19:57 +02:00
|
|
|
|
|
|
|
maven { url = 'https://maven.parchmentmc.org' }
|
2021-11-24 19:19:31 +01:00
|
|
|
maven { url "https://www.cursemaven.com" }
|
2014-11-07 14:19:05 +01:00
|
|
|
}
|
|
|
|
dependencies {
|
2021-08-22 17:09:06 +02:00
|
|
|
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
|
2021-08-22 23:19:57 +02:00
|
|
|
classpath 'org.parchmentmc:librarian:1.+'
|
2014-11-07 14:19:05 +01:00
|
|
|
}
|
|
|
|
}
|
2016-05-19 20:05:12 +02:00
|
|
|
|
2021-08-22 23:19:57 +02:00
|
|
|
apply plugin: 'net.minecraftforge.gradle'
|
|
|
|
apply plugin: 'org.parchmentmc.librarian.forgegradle'
|
2021-02-26 22:15:48 +01:00
|
|
|
apply plugin: 'java'
|
2016-05-19 20:05:12 +02:00
|
|
|
apply plugin: 'idea'
|
2021-02-26 22:15:48 +01:00
|
|
|
apply plugin: 'maven-publish'
|
2014-11-07 14:19:05 +01:00
|
|
|
|
2021-02-26 22:15:48 +01:00
|
|
|
version = "$mod_version"
|
2015-12-30 22:02:15 +01:00
|
|
|
group = "de.ellpeck.actuallyadditions"
|
2021-02-26 22:15:48 +01:00
|
|
|
archivesBaseName = "ActuallyAdditions-$game_version"
|
2014-11-07 14:19:05 +01:00
|
|
|
|
2020-11-07 14:38:30 +01:00
|
|
|
if (System.getenv('BUILD_NUMBER') != null) {
|
|
|
|
version += "." + System.getenv('BUILD_NUMBER')
|
2016-07-31 16:30:37 +02:00
|
|
|
}
|
|
|
|
|
2021-08-22 17:09:06 +02:00
|
|
|
java.toolchain.languageVersion = JavaLanguageVersion.of(8)
|
2021-02-26 22:15:48 +01:00
|
|
|
|
2014-11-07 14:19:05 +01:00
|
|
|
minecraft {
|
2021-08-22 23:19:57 +02:00
|
|
|
mappings channel: 'parchment', version: "${parchment_version}-${game_version}"
|
2021-02-26 22:15:48 +01:00
|
|
|
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
|
|
|
|
|
|
|
|
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
|
|
|
|
|
|
|
|
runs {
|
|
|
|
client {
|
|
|
|
workingDirectory project.file('run')
|
|
|
|
mods {
|
|
|
|
actuallyadditions {
|
|
|
|
source sourceSets.main
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
|
|
|
workingDirectory project.file('run')
|
|
|
|
mods {
|
|
|
|
actuallyadditions {
|
|
|
|
source sourceSets.main
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
data {
|
|
|
|
workingDirectory project.file('run')
|
2021-08-22 17:09:06 +02:00
|
|
|
args '--mod', 'actuallyadditions', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
|
|
|
|
|
2021-02-26 22:15:48 +01:00
|
|
|
mods {
|
|
|
|
actuallyadditions {
|
|
|
|
source sourceSets.main
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2014-11-07 14:19:05 +01:00
|
|
|
}
|
|
|
|
|
2021-08-22 17:09:06 +02:00
|
|
|
sourceSets.main.resources { srcDir 'src/generated/resources' }
|
|
|
|
|
2015-04-26 20:07:57 +02:00
|
|
|
repositories {
|
2016-01-16 20:06:25 +01:00
|
|
|
maven {
|
2021-02-26 22:15:48 +01:00
|
|
|
name = "Progwml6 maven"
|
|
|
|
url = "https://dvs1.progwml6.com/files/maven/"
|
2020-11-20 18:55:16 +01:00
|
|
|
}
|
|
|
|
maven {
|
2021-02-26 22:15:48 +01:00
|
|
|
url = "https://www.cursemaven.com"
|
2017-02-04 14:12:17 +01:00
|
|
|
}
|
2015-04-26 20:07:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2021-02-26 22:15:48 +01:00
|
|
|
minecraft "net.minecraftforge:forge:${game_version}-${forge_version}"
|
|
|
|
|
|
|
|
compileOnly fg.deobf("mezz.jei:jei-${jei_version}:api")
|
|
|
|
runtimeOnly fg.deobf("mezz.jei:jei-${jei_version}")
|
2021-11-24 19:19:31 +01:00
|
|
|
|
|
|
|
runtimeOnly fg.deobf("curse.maven:TOP-245211:3319255")
|
2014-11-07 14:19:05 +01:00
|
|
|
}
|
|
|
|
|
2021-02-26 22:15:48 +01:00
|
|
|
// not sure if this is still needed
|
2021-11-21 21:34:08 +01:00
|
|
|
//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'
|
|
|
|
// }
|
|
|
|
//}
|
2015-01-05 22:50:20 +01:00
|
|
|
|
2020-11-20 18:55:16 +01:00
|
|
|
jar {
|
2021-02-26 22:15:48 +01:00
|
|
|
group = 'artifact'
|
|
|
|
manifest {
|
2021-08-22 17:09:06 +02:00
|
|
|
attributes(["Specification-Title" : "Actually Additions",
|
2021-02-26 22:15:48 +01:00
|
|
|
"Specification-Version" : "1",
|
|
|
|
"Implementation-Title" : project.archivesBaseName,
|
|
|
|
"Implementation-Version" : project.version,
|
|
|
|
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")],)
|
|
|
|
}
|
2020-11-20 18:55:16 +01:00
|
|
|
|
2021-02-26 22:15:48 +01:00
|
|
|
from sourceSets.main.output
|
2020-11-20 18:55:16 +01:00
|
|
|
}
|
2016-05-19 20:05:12 +02:00
|
|
|
|
2016-01-06 03:50:15 +01:00
|
|
|
task deobfJar(type: Jar) {
|
2020-11-20 18:46:34 +01:00
|
|
|
from sourceSets.main.output
|
|
|
|
from sourceSets.main.java
|
|
|
|
classifier = 'dev'
|
2016-01-06 03:50:15 +01:00
|
|
|
}
|
2016-01-06 05:07:32 +01:00
|
|
|
|
|
|
|
task apiJar(type: Jar) {
|
2020-11-20 18:46:34 +01:00
|
|
|
from sourceSets.main.output
|
|
|
|
from sourceSets.main.java
|
|
|
|
classifier = 'api'
|
|
|
|
include 'de/ellpeck/actuallyadditions/api/**'
|
2016-07-31 16:30:37 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
javadoc {
|
|
|
|
include 'de/ellpeck/actuallyadditions/api/**'
|
|
|
|
}
|
|
|
|
|
|
|
|
task javadocJar(type: Jar, dependsOn: javadoc) {
|
|
|
|
from 'build/docs/javadoc'
|
|
|
|
classifier 'javadoc'
|
|
|
|
}
|
|
|
|
|
2020-11-20 18:46:34 +01:00
|
|
|
task sourcesJar(type: Jar) {
|
|
|
|
from sourceSets.main.java
|
|
|
|
classifier = 'sources'
|
|
|
|
}
|
|
|
|
|
2020-11-21 19:08:07 +01:00
|
|
|
artifacts {
|
|
|
|
archives deobfJar, sourcesJar, apiJar, javadocJar
|
|
|
|
}
|
|
|
|
|
2016-07-31 16:30:37 +02:00
|
|
|
publishing {
|
2020-11-21 19:08:07 +01:00
|
|
|
tasks.publish.dependsOn build
|
2016-07-31 16:30:37 +02:00
|
|
|
publications {
|
|
|
|
mavenJava(MavenPublication) {
|
2020-11-21 19:08:07 +01:00
|
|
|
groupId = group
|
|
|
|
artifactId = archivesBaseName
|
|
|
|
version = version
|
|
|
|
|
|
|
|
from components.java
|
|
|
|
|
|
|
|
artifact deobfJar
|
|
|
|
artifact sourcesJar
|
2020-11-20 19:02:53 +01:00
|
|
|
artifact apiJar
|
|
|
|
artifact javadocJar
|
2020-11-21 19:08:07 +01:00
|
|
|
|
|
|
|
pom.withXml {
|
|
|
|
def node = asNode()
|
|
|
|
if (node.dependencies.size() > 0)
|
|
|
|
node.remove(node.dependencies)
|
|
|
|
}
|
2016-07-31 16:30:37 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
repositories {
|
|
|
|
maven {
|
2020-10-07 21:25:00 +02:00
|
|
|
url "file://" + System.getenv("local_maven")
|
2016-07-31 16:30:37 +02:00
|
|
|
}
|
|
|
|
}
|
2021-02-26 22:15:48 +01:00
|
|
|
}
|