-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
116 lines (97 loc) · 2.67 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
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
}
group 'io.github.lgatodu47'
version "${meowrapper_version}" + (snapshot == "true" ? "-SNAPSHOT" : "")
java {
toolchain {
languageVersion = JavaLanguageVersion.of(8)
}
}
repositories {
mavenCentral()
}
configurations {
exports {
canBeConsumed = false
canBeResolved = true
}
implementation.extendsFrom(exports)
}
dependencies {
exports group: 'com.google.code.gson', name: 'gson', version: "${gson_version}"
}
jar {
manifest {
attributes(
"Main-class": "io.github.lgatodu47.meowrapper.MeoWrapper"
)
}
libsDirName = "libs/${meowrapper_version}"
}
task fatJar(type: Jar) {
classifier 'cmd'
group 'build'
manifest = jar.manifest
from { configurations.exports.collect {it.isDirectory() ? it : zipTree(it)} }
with jar
}
task javadocJar(type: Jar) {
classifier 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
classifier 'sources'
from sourceSets.main.allSource
}
publishing {
publications {
meowrapper(MavenPublication) {
from components.java
artifact javadocJar
artifact sourcesJar
pom {
name = 'MeoWrapper'
description = 'A simple minecraft launchwrapper'
url = 'https://github.com/LGatodu47/MeoWrapper'
licenses {
license {
name = 'MIT License'
url = "https://www.opensource.org/licenses/mit-license.php"
}
}
scm {
connection = "scm:git:https://github.com/LGatodu47/MeoWrapper.git"
developerConnection = "scm:git:ssh://github.com/LGatodu47/MeoWrapper.git"
url = "https://github.com/LGatodu47/MeoWrapper"
}
developers {
developer {
id = 'lgatodu47'
name = 'LGatodu47'
email = '[email protected]'
}
}
}
}
}
repositories {
maven {
name = "Local"
url layout.buildDirectory.dir("repo")
}
maven {
name = "OSSRH"
url 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2'
credentials {
username System.getProperty("meowrapper.publish.username")
password System.getProperty("meowrapper.publish.password")
}
}
}
}
signing {
sign publishing.publications.meowrapper
}