aboutsummaryrefslogtreecommitdiff
path: root/forge-runtime/build.gradle
blob: 388db8e31b9cb1d50e4c4db8c6f250b7a5bbdcbf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
plugins {
	id 'java'
	id 'maven-publish'
	id 'checkstyle'
	id 'com.github.johnrengelman.shadow' version '7.0.0'
	id "com.diffplug.spotless"
}

group = rootProject.group
archivesBaseName = 'architectury-loom-forge-runtime'
version = rootProject.version

sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8

configurations {
	include
	compileOnly.extendsFrom include
}

tasks.withType(JavaCompile).configureEach {
	it.options.encoding = "UTF-8"
	it.options.release = 8
}

repositories {
	mavenCentral()
	maven { url "https://maven.fabricmc.net/" }
	maven {
		url "https://maven.minecraftforge.net/"
		content {
			excludeGroupByRegex "org\\.eclipse\\.?.*"
		}
	}
}

dependencies {
	// shadowed
	include ('net.fabricmc:tiny-mappings-parser:0.3.0+build.17')

	// guaranteed to be there at runtime
	compileOnly ('cpw.mods:modlauncher:6.1.3')
	compileOnly ('org.spongepowered:mixin:0.8.2')
	compileOnly ('com.google.code.gson:gson:2.8.6')
	compileOnly ('com.google.guava:guava:21.0')
	compileOnly ('org.apache.logging.log4j:log4j-api:2.11.2')
}

jar {
	archiveClassifier = "slim"
}

shadowJar {
	archiveClassifier = ""
	configurations = [project.configurations.include]
	relocate "net.fabricmc.mapping", "dev.architectury.loom.forgeruntime.shadow.mapping"
	relocate "net.fabricmc.mappings", "dev.architectury.loom.forgeruntime.shadow.mappings"
}

assemble.dependsOn shadowJar

spotless {
	java {
		licenseHeaderFile(rootProject.file("HEADER")).yearSeparator("-")
		targetExclude("**/loom/forgeruntime/mixin/MixinIntermediaryDevRemapper.java")
	}
}

checkstyle {
	configFile = rootProject.checkstyle.configFile
	toolVersion = rootProject.checkstyle.toolVersion
}

publishing {
	publications {
		maven(MavenPublication) {
			artifactId = 'architectury-loom-forge-runtime'
			shadow.component it
		}
	}

	repositories {
		if (System.getenv("MAVEN_PASS") != null) {
			maven {
				url = "https://deploy.shedaniel.me/"
				credentials {
					username = "shedaniel"
					password = System.getenv("MAVEN_PASS")
				}
			}
		}
	}
}