This repository has been archived by the owner on Jun 20, 2019. It is now read-only.
/
build.gradle
161 lines (140 loc) · 4.76 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
buildscript {
repositories {
mavenCentral()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
classpath group: 'com.github.rodionmoiseev.gradle.plugins', name: 'idea-utils', version: '0.2'
}
}
import groovy.json.*
configurations {
compile
deployJars
}
apply plugin: "forge"
apply plugin: "maven"
apply plugin: "idea-utils"
group = "net.doubledoordev.ftsw"
version = "1.1.0"
targetCompatibility = 1.7
sourceCompatibility = 1.7
archivesBaseName = 'ForgeTwitchSubWhitelist'
def githuborg = 'DoubleDoorDevelopment'
def description = 'Auto checks login attempts against the Twitch API'
minecraft {
version = "1.7.10-10.13.2.1286"
runDir = "jars"
}
repositories {
maven {
name "DDD repo"
url "http://doubledoordev.net/maven/"
}
}
dependencies {
compile "net.doubledoordev.d3core:D3Core:" + project.minecraft.version + "-+:dev"
}
if (System.getenv().BUILD_NUMBER != null) version += "." + System.getenv().BUILD_NUMBER
def builder = new groovy.json.JsonBuilder()
builder (version: version, mcversion: project.minecraft.version, apiversion: project.minecraft.apiVersion)
new File("versions.json").write(builder.toPrettyString())
processResources {
from(sourceSets.main.resources.srcDirs) {
include '**/*.info'
expand 'version':project.version, 'mcversion':project.minecraft.version, 'modid':project.archivesBaseName, 'githuborg':githuborg, 'description':description
}
from(sourceSets.main.resources.srcDirs) {
exclude '**/*.info'
}
}
task sourcesJar(type: Jar) {
from "LICENSE.txt"
from sourceSets.main.allSource
classifier = 'src'
appendix = project.minecraft.version
}
task deobfJar(type: Jar) {
from "LICENSE.txt"
from sourceSets.main.output
from (sourceSets.main.allSource.srcDirs) {
include '**/*.java'
}
classifier = 'dev'
appendix = project.minecraft.version
}
jar {
from "LICENSE.txt"
appendix = project.minecraft.version
}
artifacts {
archives jar
archives sourcesJar
archives deobfJar
}
idea {
project {
copyright {
name = 'New BSD License'
license = file('LICENSE.txt')
}
}
}
uploadArchives {
if (project.hasProperty("dddUser") && project.hasProperty("dddPass")) {
repositories {
mavenDeployer {
repository(url: "http://doubledoordev.net:8082/artifactory/mods") {
authentication(userName: dddUser, password: dddPass)
}
pom {
groupId = project.group
version = project.minecraft.version + "-" + project.version
artifactId = project.archivesBaseName
project {
name project.archivesBaseName
packaging 'jar'
description = description
url 'https://github.com/' + githuborg + '/' + project.archivesBaseName
scm {
url 'https://github.com/' + githuborg + '/' + project.archivesBaseName
connection 'scm:git:git://github.com/' + githuborg + '/' + project.archivesBaseName + '.git'
developerConnection 'scm:git:git@github.com:' + githuborg + '/' + project.archivesBaseName + '.git'
}
issueManagement {
system 'github'
url 'https://github.com/' + githuborg + '/' + project.archivesBaseName + '/issues'
}
licenses {
license {
name 'New BSD License'
url 'https://raw.github.com/' + githuborg + '/' + project.archivesBaseName + '/master/LICENCE.txt'
distribution 'repo'
}
}
developers {
developer {
id 'Dries007'
name 'Dries007'
roles { role 'developer' }
}
developer {
id 'Claycorp'
name 'Claycorp'
roles { role 'developer' }
}
}
}
}
}
}
}
}