forked from squeek502/AppleSkin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
112 lines (96 loc) · 2.64 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
buildscript {
repositories {
maven { url = 'https://files.minecraftforge.net/maven' }
mavenCentral()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
}
}
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'
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
minecraft {
mappings channel: mappings_channel, version: mappings_version
// default run configurations.
// these can be tweaked, removed, or duplicated as needed.
runs {
client {
workingDirectory project.file('run')
mods {
appleskin {
source sourceSets.main
}
}
}
server {
workingDirectory project.file('run')
mods {
appleskin {
source sourceSets.main
}
}
}
}
}
group = project.maven_group
archivesBaseName = project.archives_base_name
version = "mc" + project.minecraft_version + "-" + project.mod_version
def semver_version = project.mod_version + "+mc" + project.minecraft_version
sourceSets.main.java.srcDirs += 'java'
sourceSets.main.java.srcDirs += 'apis'
sourceSets.main.resources.srcDirs += 'resources'
dependencies {
minecraft 'net.minecraftforge:forge:'+minecraft_version+'-'+forge_version
}
jar {
manifest {
attributes([
"Specification-Title": "appleskin",
"Specification-Vendor": "squeek",
"Specification-Version": "1",
"Implementation-Title": project.name,
"Implementation-Version": semver_version,
"Implementation-Vendor" :"squeek",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
finalizedBy 'reobfJar'
}
task sourcesJar(type: Jar) {
archiveClassifier.set("sources")
from sourceSets.main.allJava
}
task apiJar(type: Jar) {
archiveClassifier.set("api")
from sourceSets.main.output
include "squeek/appleskin/api/**"
finalizedBy 'reobfJar'
}
artifacts {
archives sourcesJar
archives apiJar
}
publishing {
publications {
mavenJava(MavenPublication) {
groupId = group
artifactId = archivesBaseName
// add all the jars that should be included when publishing to maven
artifact(jar)
artifact(sourcesJar)
artifact(apiJar)
}
}
repositories {
maven {
url = project.findProperty("maven.url") ?: System.getenv("MAVEN_URL")
credentials {
username=project.findProperty("maven.user") ?: System.getenv("MAVEN_USER")
password=project.findProperty("maven.password") ?: System.getenv("MAVEN_PASSWORD")
}
}
}
}