-
Notifications
You must be signed in to change notification settings - Fork 88
/
build.gradle
116 lines (102 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
116
plugins {
id 'java-library'
id 'com.github.johnrengelman.shadow' version '7.1.2'
id 'net.researchgate.release' version '3.0.2'
id 'io.github.gradle-nexus.publish-plugin' version '2.0.0'
id 'maven-publish'
id 'signing'
}
repositories {
jcenter()
}
java {
withSourcesJar()
withJavadocJar()
toolchain {
languageVersion = JavaLanguageVersion.of(8)
}
}
shadowJar {
archiveClassifier = 'shadow'
relocate 'org.objectweb.asm', 'org.objectweb.asm.shaded'
}
tasks.withType(Javadoc).configureEach {
options.addStringOption('Xdoclint:none', '-quiet')
}
dependencies {
api 'com.github.jnr:jnr-ffi:2.2.17'
api 'com.github.jnr:jnr-posix:3.1.19'
api 'com.github.jnr:jnr-constants:0.10.4'
testImplementation 'junit:junit:4.13.2'
}
release {
newVersionCommitMessage = '[jnr-fuse release] - '
preTagCommitMessage = '[jnr-fuse release] - pre tag commit: '
buildTasks = ['clean', 'assemble', 'publishToSonatype', 'closeAndReleaseSonatypeStagingRepository']
git {
requireBranch.set('master')
}
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = 'jnr-fuse'
from components.java
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
pom {
name = 'jnr-fuse'
description = 'jnr-fuse is a FUSE implementation in java using Java Native Runtime (JNR).'
url = 'https://github.com/SerCeMan/jnr-fuse'
licenses {
license {
name = 'The MIT License (MIT)'
url = 'https://opensource.org/licenses/MIT'
}
}
developers {
developer {
id = 'SerCe'
name = 'Sergey Tselovalnikov'
email = '[email protected]'
}
}
scm {
url = 'https://github.com/SerCeMan/jnr-fuse'
connection = 'scm:git:[email protected]:SerCeMan/jnr-fuse.git'
developerConnection = 'scm:git:[email protected]:SerCeMan/jnr-fuse.git'
}
}
}
}
repositories {
maven {
// A test repository in the build repository
// allowing easy verification of published artifacts
name = 'projectLocal'
url = file("${buildDir}/repo")
}
}
}
nexusPublishing {
repositories {
sonatype {
username.set(providers.environmentVariable("SONATYPE_LOGIN").forUseAtConfigurationTime())
password.set(providers.environmentVariable("SONATYPE_PASSWORD").forUseAtConfigurationTime())
}
}
}
signing {
sign publishing.publications.mavenJava
setRequired {
gradle.taskGraph.allTasks.any {
it.name == 'publishToSonatype'
}
}
}