forked from dokan-dev/dokan-java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
158 lines (144 loc) · 4.08 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
/*
* This file was generated by the Gradle 'init' task.
*
* It describes how to build the dokan-java project.
*
* To publish to the local Maven repository, execute 'gradle publishToMavenLocal'
*/
plugins {
// Apply the java-library plugin to add support for Java Library
id 'java-library'
id 'maven-publish'
id 'com.jfrog.bintray' version '1.8.4'
}
tasks.withType(JavaCompile) {
options.incremental = true
options.encoding = 'UTF-8'
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
dependencies {
implementation (group:'net.java.dev.jna', name:'jna', version:jnaVersion)
api (group:'net.java.dev.jna', name:'jna-platform', version:jnaVersion)
testImplementation (group:'org.slf4j', name:'slf4j-simple', version:'1.7.25')
testImplementation (group:'org.junit.jupiter', name:'junit-jupiter-api', version:junitVersion)
testRuntimeOnly (group:'org.junit.jupiter', name:'junit-jupiter-engine', version:junitVersion)
}
// In this section you declare where to find the dependencies of your project
repositories {
mavenCentral()
jcenter()
}
//Check if the bintray credentials are defined, otherwise set them to dummy values
ext {
if(project.hasProperty('bintrayUsername')){
bintrayUser = bintrayUsername
} else {
bintrayUser = 'NOT DEFINED'
}
if(project.hasProperty('bintrayApiKey')){
bintrayKey = bintrayApiKey
} else {
bintrayKey = 'NOT DEFINED'
}
}
bintray{
user = bintrayUser
key = bintrayKey
publications = ['release']
pkg {
version {
name = project.version
desc = project.description
released = new Date()
vcsTag = project.version
gpg {
sign = true
passphrase = System.getenv("PWD")
}
}
repo = 'maven'
name = project.name
licenses = ['LGPL-3.0']
vcsUrl = scmUrl
}
}
test {
useJUnitPlatform()
}
task sourcesJar(type: Jar) {
archiveClassifier = 'sources'
from sourceSets.main.allJava
}
task javadocJar(type: Jar) {
archiveClassifier = 'javadoc'
from javadoc.destinationDir
}
task showBintrayInfo() {
description 'Shows your system bintray credentials, if defined, otherwise NOT DEFINED '
group 'bintray'
doLast() {
println bintrayUser
print bintrayKey
}
}
task showProjectInfo(){
doLast() {
println project.name
println project.version
println project.description
}
}
tasks {
jar {
manifest {
attributes(
'Implementation-Title': project.name,
'Implementation-Version': project.version,
'Specification-Title': project.description,
'Specification-Version': project.version,
)
}
}
}
publishing {
publications {
release(MavenPublication) {
from components.java
groupId group
artifactId artifact
artifact sourcesJar
artifact javadocJar
pom {
name = project.name
description = project.description
url = scmUrl
licenses {
license {
name = licenseName
url = licenseUrl
distribution = "repo"
}
}
developers {
developer {
id = maintainerId
name = maintainer
email = maintainerMail
timezone = '+1'
}
}
scm {
connection = 'scm:git:git://github.com/dokan-dev/dokan-java.git'
url = scmUrl
}
}
}
}
}
javadoc {
if(JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}