-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
110 lines (95 loc) · 2.78 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
/*
* This file was generated by the Gradle 'init' task.
*/
plugins {
id 'java'
id 'maven-publish'
id 'idea' // Intellij Idea Support
id 'eclipse' // Eclipse Support
}
repositories {
// Use Maven Central for resolving dependencies.
mavenCentral()
maven {
url "https://s01.oss.sonatype.org/content/groups/public/"
}
}
dependencies {
implementation fileTree(dir: 'lib', include: ['*.jar'])
}
compileJava.options.encoding = "UTF-8"
compileTestJava.options.encoding = "UTF-8"
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
group = 'com.benj4.gcpm'
version = '1.0.0-dev'
description = 'The Grasscutter Permission Manager.'
java {
withJavadocJar()
withSourcesJar()
}
jar {
jar.baseName = 'gcpm-plugin'
from {
configurations.runtimeClasspath.collect {
// Put the jar name of any dependencies you may need into the array
if (!it.name.contains("grasscutter")) {
println ('Packaging ' + it.name)
it.isDirectory() ? it : zipTree(it)
}
}
} {
exclude('META-INF/LICENSE*')
exclude("META-INF/versions/9/module-info.class")
exclude("META-INF/NOTICE")
}
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
destinationDir = file(".")
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = 'gcpm'
from components.java
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
pom {
name = 'GCPM'
description = 'The Grasscutter Permission Manager.'
url = 'https://github.com/4Benj/gcpm'
licenses {
// todo
}
developers {
developer {
id = 'benj'
name = '4Benj_'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:[email protected]:4Benj/gcpm.git'
developerConnection = 'scm:git:ssh://github.com:4Benj/gcpm.git'
url = 'https://github.com/4Benj/gcpm'
}
}
}
}
repositories {
maven {
println ("Publishing to 4benj-maven")
url 'https://repo.4benj.com/releases'
name '4benj-maven'
credentials {
username System.getenv('benj_maven_username')
password System.getenv('benj_maven_token')
}
}
}
}