forked from DmitriiShamrikov/mslinks
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
123 lines (106 loc) · 3.19 KB
/
build.gradle
File metadata and controls
123 lines (106 loc) · 3.19 KB
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
117
118
119
120
121
122
123
plugins {
id 'java-library'
id 'com.adarshr.test-logger' version '4.0.0'
id 'eclipse'
id 'maven-publish'
id 'signing'
id 'io.github.gradle-nexus.publish-plugin' version '2.0.0'
}
group = "org.jabref"
version = '1.1.2-SNAPSHOT'
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
withJavadocJar()
withSourcesJar()
}
tasks.withType(Javadoc).configureEach {
// Ignore warnings because of missing elements
options.addStringOption('Xdoclint:all,-missing', '-quiet')
}
sourceSets {
main {
java {
srcDirs = ['src']
}
}
test {
java {
srcDirs = ['test']
}
}
}
repositories {
mavenCentral()
}
dependencies {
testImplementation 'junit:junit:4.13.2'
}
test {
useJUnit {
excludeCategories = ['mslinks.ReadTestData', 'mslinks.WriteTestData', 'mslinks.Examples']
}
}
testlogger {
theme = 'mocha'
showStandardStreams = true
}
eclipse {
classpath {
defaultOutputDir = file('build/eclipse-default')
file.whenMerged {
entries.each { entry ->
if (entry.kind == 'src' && entry.hasProperty('output')) {
entry.output = entry.output.replace('bin/', "build/eclipse/")
}
}
}
}
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = 'mslinks'
from components.java
pom {
name = 'mslinks'
description = 'Library for parsing and creating Windows shortcut files (.lnk)'
url = 'https://github.com/DmitriiShamrikov/mslinks'
licenses {
license {
name = 'WTFPL'
url = 'http://www.wtfpl.net/about/'
distribution = 'repo'
}
}
developers {
developer {
id = 'DmitriiShamrikov'
}
}
scm {
url = 'https://github.com/DmitriiShamrikov/mslinks'
connection = 'scm:git:git://github.com/DmitriiShamrikov/mslinks.git'
developerConnection = 'scm:git:[email protected]:DmitriiShamrikov/mslinks.git'
}
}
}
}
}
signing {
required = isReleaseVersion
useInMemoryPgpKeys(System.getenv("SIGNING_KEY"), System.getenv("SIGNING_PASSWORD"))
sign publishing.publications.mavenJava
}
nexusPublishing {
repositories {
// see https://central.sonatype.org/publish/publish-portal-ossrh-staging-api/#configuration
sonatype {
username = System.getenv("OSSRH_USERNAME")
password = System.getenv("OSSRH_TOKEN")
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
}
}
}