forked from McJtyMods/TheOneProbe
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
125 lines (105 loc) · 2.59 KB
/
build.gradle
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
// For those who want the bleeding edge
buildscript {
repositories {
mavenCentral()
maven {
name = "forge"
url = "https://files.minecraftforge.net/maven"
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3.4'
}
}
plugins {
id 'com.gradle.build-scan' version '1.16'
id 'com.matthewprenger.cursegradle' version '1.1.0'
}
buildScan {
licenseAgreementUrl = 'https://gradle.com/terms-of-service'
licenseAgree = 'yes'
}
apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'maven-publish'
repositories {
maven {
url = "https://dvs1.progwml6.com/files/maven"
}
maven {
url = "https://maven.k-4u.nl"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
maven {
name = "CoFH Maven"
url = "https://maven.covers1624.net"
}
maven { //Cleanroom (HEI)
url 'https://maven.cleanroommc.com'
}
}
def ENV = System.getenv()
if (ENV.DRONE_BUILD_NUMBER) {
version += ".n" + ENV.DRONE_BUILD_NUMBER
}
group = "mcjty.theoneprobe"
archivesBaseName = "theonesmeagle"
if (System.getenv('BUILD_NUMBER') != null) {
version += "-${System.getenv('BUILD_NUMBER')}"
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
minecraft {
version = "${minecraft_version}-${forge_version}"
runDir = "run"
mappings = mcp_mappings
useDepAts = true
}
dependencies {
deobfCompile 'mezz:jei:4.26.2'
deobfCompile "cofh:RedstoneFlux:${redstoneflux_version}"
}
jar {
manifest {
attributes 'FMLAT': 'top_at.cfg'
}
finalizedBy 'reobfJar' // This ensures reobfuscation runs after the jar is created
}
processResources {
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
expand 'version': project.version, 'mcversion': project.minecraft.version
}
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}
task apiJar(type: Jar) {
classifier = "api"
from(sourceSets.main.output) {
include "mcjty/theoneprobe/api/**"
}
}
artifacts {
archives apiJar
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact apiJar
artifact sourceJar
}
}
repositories {
if (project.hasProperty('mavendir')) {
maven { url mavendir }
} else {
mavenLocal()
}
}
}