-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
executable file
·99 lines (87 loc) · 2.14 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
buildscript {
repositories {
mavenCentral()
jcenter()
maven {
name = 'Fabric'
url = 'http://maven.modmuss50.me/'
}
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "net.fabricmc:fabric-loom:0.2.0-SNAPSHOT"
//classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.0'
}
}
plugins {
//id 'java'
//id 'eclipse'
//id 'idea'
id 'maven-publish'
}
apply plugin: net.fabricmc.loom.LoomGradlePlugin
sourceCompatibility = 1.8
targetCompatibility = 1.8
archivesBaseName = "infraredstone"
ext {
standardVersion = "1.1.0"
mcVersion = "19w08a"
}
repositories {
flatDir {
// here until farfetchd gets stuff in a maven
dirs 'libs'
}
}
dependencies {
minecraft "com.mojang:minecraft:19w08a"
mappings "net.fabricmc:yarn:19w08a.4"
modCompile "net.fabricmc:fabric-loader:0.3.7.108"
modCompile "net.fabricmc:fabric:0.2.2.103"
//implementation 'org.jetbrains:annotations:15.0'
modCompile "io.github.prospector.silk:SilkAPI:1.0.0-26"
modCompile name: "qcommon-architect-1.0.1-dev"
modCompile name: "qcommon-croco-1.0.4-dev"
}
if (System.properties["release"] == null) {
def branch
if (System.env.BRANCH_NAME) {
// Jenkins support
branch = System.env.BRANCH_NAME
branch = branch.substring(branch.lastIndexOf('/')+1)
} else {
branch = 'git rev-parse --abbrev-ref HEAD'.execute().in.text.trim()
}
if (branch == "HEAD") {
branch = 'git rev-parse --short HEAD'.execute().in.text.trim()
}
def commits = 'git rev-list --count HEAD'.execute().in.text.trim()
def dirty = !'git diff-index HEAD'.execute().in.text.trim().isEmpty()
version = branch+'-'+ext.standardVersion+'.'+commits+(dirty ? '-dirty' : '')+'+'+ext.mcVersion
} else {
version = ext.standardVersion+'+'+ext.mcVersion
}
task sourcesJar(type: Jar) {
from sourceSets.main.allJava
classifier = 'sources'
}
task javadocJar(type: Jar) {
from javadoc
classifier = 'javadoc'
}
publishing {
publications {
mavenPrimary(MavenPublication) {
groupId "com.elytradev"
artifactId = "infraredstone-fabric"
from components.java
artifact sourcesJar
artifact javadocJar
}
}
}
if (file('private.gradle').exists()) {
apply from: 'private.gradle'
}