-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
101 lines (86 loc) · 3.06 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
plugins {
id 'net.kyori.indra.licenser.spotless' version '2.2.0' apply false
id 'io.github.gradle-nexus.publish-plugin' version '2.0.0'
}
version = '2.0.0-SNAPSHOT'
group = 'dev.vankka'
allprojects {
apply plugin: 'java'
apply plugin: 'java-library'
apply plugin: 'maven-publish'
apply plugin: 'signing'
apply plugin: 'net.kyori.indra.licenser.spotless'
group = rootProject.group
version = rootProject.version
repositories {
mavenCentral()
}
dependencies {
compileOnly 'org.jetbrains:annotations:24.1.0'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
withJavadocJar()
withSourcesJar()
}
indraSpotlessLicenser {
licenseHeaderFile(rootProject.file('buildscript/LICENSE_HEADER'))
newLine(true)
property('inception', '2021')
property('year_now', String.valueOf(Calendar.getInstance().get(Calendar.YEAR)))
}
publishing {
publications {
maven(MavenPublication) {
from components.java
artifactId = 'dependencydownload-' + project.name
pom {
name = 'dependencydownload-' + project.name
packaging = 'jar'
description = 'A library to download dependencies during runtime'
url = '/~https://github.com/Vankka/DependencyDownload'
scm {
connection = 'scm:git:/~https://github.com/Vankka/DependencyDownload.git'
developerConnection = 'scm:git:/~https://github.com/Vankka/DependencyDownload.git'
url = '/~https://github.com/Vankka/DependencyDownload'
}
licenses {
license {
name = 'MIT License'
url = 'https://www.opensource.org/licenses/mit-license.php'
}
}
developers {
developer {
id = 'Vankka'
}
}
}
}
}
}
if (System.getenv('SIGNING_KEY') != null || project.hasProperty("signing.keyId")) {
signing {
sign publishing.publications.maven
def key = System.getenv('SIGNING_KEY')
if (key != null) {
useInMemoryPgpKeys(key, System.getenv('SIGNING_KEY_PASS'))
}
}
}
}
tasks.withType(PublishToMavenRepository).configureEach {
it.enabled = false
}
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri('https://s01.oss.sonatype.org/service/local/'))
snapshotRepositoryUrl.set(uri('https://s01.oss.sonatype.org/content/repositories/snapshots/'))
packageGroup = rootProject.group
}
}
}