-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
97 lines (83 loc) · 1.7 KB
/
build.gradle
File metadata and controls
97 lines (83 loc) · 1.7 KB
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
buildscript {
repositories {
mavenCentral()
maven {
name = 'forge'
url = getProperty('net.minecraftforge.repository.url')
}
}
dependencies {
classpath('com.anatawa12.forge:ForgeGradle:1.2-1.1.+') {
changing = true
}
}
}
repositories {
flatDir {
dirs rootProject.file('lib')
}
mavenCentral()
}
apply plugin: 'java-library'
apply plugin: 'forge'
apply plugin: 'maven-publish'
// Project settings
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}
minecraft {
version = '1.7.10-10.13.4.1614-1.7.10'
}
dependencies {
api 'org.bukkit:bukkit:1.7.10-R0.1'
}
jar {
manifest {
attributes 'FMLCorePluginContainsFMLMod': 'true'
attributes 'FMLCorePlugin': 'theandrey.bukkit.asm.LoadingPlugin'
}
}
tasks.register('devJar', Jar) {
archiveClassifier.set('dev')
manifest = jar.manifest
from sourceSets.main.output
}
tasks.register('sourcesJar', Jar) {
archiveClassifier.set('sources')
from sourceSets.main.allSource
}
artifacts {
archives tasks.devJar
archives tasks.sourcesJar
}
tasks.withType(GenerateModuleMetadata).configureEach {
enabled = false
}
publishing {
repositories {
maven {
name = 'redserver'
url = findProperty('redserver.repository.url')
credentials() {
username findProperty('redserver.repository.user')
password findProperty('redserver.repository.pass')
}
}
}
publications {
maven(MavenPublication) {
from components.java
artifact devJar
artifact sourcesJar
pom.withXml {
Node pomNode = asNode()
pomNode.dependencies.'*'.findAll() {
it.artifactId.text() != 'bukkit'
}.each() {
it.parent().remove(it)
}
}
}
}
}