forked from FIXxp/BON2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
76 lines (64 loc) · 1.69 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
buildscript {
repositories {
mavenCentral()
gradlePluginPortal()
}
dependencies {
classpath "gradle.plugin.com.github.johnrengelman:shadow:7.1.2"
}
}
apply plugin: 'java'
apply plugin: 'java-library'
apply plugin: 'maven-publish'
apply plugin: 'com.github.johnrengelman.shadow'
version = '2.5.0.2'
group = 'io.github.mjaroslav' // This custom distribution fork, original group: com.github.parker8283
archivesBaseName = 'BON'
repositories {
mavenCentral()
}
dependencies {
api 'org.ow2.asm:asm-debug-all:5.0.4'
api 'com.google.guava:guava:18.0'
api 'net.sf.jopt-simple:jopt-simple:4.9'
api 'com.google.code.gson:gson:2.7'
api 'net.sf.trove4j:trove4j:3.0.3'
api 'org.apache.commons:commons-lang3:3.7'
}
// Relace this bullshit
task copyAndReplace(type: Copy) {
from(sourceSets.main.java) {
include '**/BON2.java'
expand 'DEV': project.version
}
from(sourceSets.main.java) {
exclude '**/BON2.java'
}
into project.getBuildDir().toString() + "/sources/java"
}
tasks.compileJava.dependsOn copyAndReplace
tasks.compileJava.setSource(project.getBuildDir().toString() + '/sources/java')
jar {
manifest {
attributes 'Main-Class': 'io.github.mjaroslav.bon2.BON2'
attributes 'Implementation-Title': 'Bearded Octo Nemesis 2'
attributes 'Implementation-Version': project.version
attributes 'Built-With': 'Gradle v' + project.getGradle().getGradleVersion()
}
}
java {
withSourcesJar()
}
shadowJar {
classifier 'all'
}
artifacts {
archives shadowJar
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
}