This repository has been archived by the owner on Dec 7, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
141 lines (131 loc) · 4.63 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
plugins {
id "java-library"
id "maven-publish"
id "signing"
// used for formatting all java code via: $ ./gradlew goJF
id "com.github.sherter.google-java-format" version "0.8"
id "org.sonarqube" version "2.8"
}
group "com.fiskaly.sdk"
version "1.2.200"
def platformVersion(String variant) {
def parts = [ version.minus("-SNAPSHOT"), variant ]
if (version.endsWith("SNAPSHOT")) {
parts.add("SNAPSHOT")
}
return parts.join("-")
}
java {
withJavadocJar()
withSourcesJar()
sourceCompatibility = JavaVersion.VERSION_1_6
targetCompatibility = JavaVersion.VERSION_1_6
}
repositories {
mavenCentral()
}
dependencies {
implementation "com.google.code.gson:gson:2.8.6"
implementation "net.iharder:base64:2.3.9"
implementation "net.java.dev.jna:jna:5.5.0"
testCompile "junit:junit:4.13"
}
publishing {
repositories {
maven {
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2"
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username = project.findProperty("nexusUsername")
password = project.findProperty("nexusPassword")
}
}
}
publications {
mavenJre(MavenPublication) {
from components.java
pom {
name = "fiskaly Java/JRE SDK"
description = "fiskaly Cloud-TSE SDK for Java/JRE"
version = platformVersion("jre")
url = "https://github.com/fiskaly/fiskaly-sdk-java"
scm {
connection = "scm:https://github.com/fiskaly/fiskaly-sdk-java.git"
developerConnection = "scm:git:https://github.com/fiskaly/fiskaly-sdk-java.git"
url = "https://github.com/fiskaly/fiskaly-sdk-java"
}
licenses {
license {
name = "The MIT License"
url = "https://github.com/fiskaly/fiskaly-sdk-java/blob/master/license.txt"
}
}
developers {
developer {
id = "benjamin.auinger.fiskaly"
name = "Benjamin Auinger"
email = "benjamin.auinger@fiskaly.com"
}
developer {
id = "pgaubatz"
name = "Patrick Gaubatz"
email = "patrick.gaubatz@fiskaly.com"
}
}
}
}
mavenAndroid(MavenPublication) {
from components.java
pom {
name = "fiskaly Java/Android SDK"
description = "fiskaly Cloud-TSE SDK for Java/Android"
version = platformVersion("android")
url = "https://github.com/fiskaly/fiskaly-sdk-java"
scm {
connection = "scm:https://github.com/fiskaly/fiskaly-sdk-java.git"
developerConnection = "scm:git:https://github.com/fiskaly/fiskaly-sdk-java.git"
url = "https://github.com/fiskaly/fiskaly-sdk-java"
}
licenses {
license {
name = "The MIT License"
url = "https://github.com/fiskaly/fiskaly-sdk-java/blob/master/license.txt"
}
}
developers {
developer {
id = "benjamin.auinger.fiskaly"
name = "Benjamin Auinger"
email = "benjamin.auinger@fiskaly.com"
}
developer {
id = "pgaubatz"
name = "Patrick Gaubatz"
email = "patrick.gaubatz@fiskaly.com"
}
}
}
pom.withXml {
asNode().getAt("dependencies")
.getAt("dependency")
.find {
it.getAt("artifactId").text() == "jna"
}
.appendNode("type", "aar")
}
}
}
}
signing {
sign publishing.publications.mavenJre
sign publishing.publications.mavenAndroid
}
javadoc {
if (JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption("html5", true)
}
}
tasks.withType(GenerateModuleMetadata) {
enabled = false
}