-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.gradle
115 lines (96 loc) · 3.11 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
plugins {
id 'java-library'
id 'maven-publish'
id 'net.minecrell.licenser' version '0.4.1'
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
withJavadocJar()
withSourcesJar()
}
group = 'org.cadixdev'
archivesBaseName = project.name.toLowerCase()
version = '0.1.0-SNAPSHOT'
repositories {
mavenCentral()
if (mercuryVersion.endsWith("-SNAPSHOT")) {
maven {
url 'https://oss.sonatype.org/content/groups/public/'
}
}
}
dependencies {
api "org.cadixdev:mercury:$mercuryVersion"
testImplementation 'org.junit.jupiter:junit-jupiter:5.6.2'
}
test {
useJUnitPlatform()
}
license {
header = project.file('HEADER.txt')
exclude 'org/cadixdev/mercury/mixin/annotation/AccessorName.java'
}
processResources {
from 'LICENSE.txt'
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = project.archivesBaseName
from components.java
pom {
name = project.name
description = project.description
packaging = 'jar'
url = project.url
inceptionYear = project.inceptionYear
scm {
url = 'https://github.com/CadixDev/MercuryMixin'
connection = 'scm:git:https://github.com/CadixDev/MercuryMixin.git'
developerConnection = 'scm:git:git@github.com:CadixDev/MercuryMixin.git'
}
issueManagement {
system = 'GitHub'
url = 'https://github.com/CadixDev/MercuryMixin/issues'
}
licenses {
license {
name = 'Mozilla Public License 2.0'
url = 'https://opensource.org/licenses/MPL-2.0'
distribution = 'repo'
}
}
developers {
developer {
id = 'jamierocks'
name = 'Jamie Mansfield'
email = 'jmansfield@cadixdev.org'
url = 'https://www.jamiemansfield.me/'
timezone = 'Europe/London'
}
}
}
}
}
repositories {
if (project.hasProperty('ossrhUsername') && project.hasProperty('ossrhPassword')) {
maven {
url = !version.endsWith('-SNAPSHOT') ?
'https://oss.sonatype.org/service/local/staging/deploy/maven2/' :
'https://oss.sonatype.org/content/repositories/snapshots/'
credentials {
username = ossrhUsername
password = ossrhPassword
}
}
}
}
}
if (project.hasProperty('ossrhUsername') && project.hasProperty('ossrhPassword')) {
apply plugin: 'signing'
signing {
required { !version.endsWith('-SNAPSHOT') && gradle.taskGraph.hasTask(tasks.publish) }
sign publishing.publications.mavenJava
}
}