-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathbuild.gradle
112 lines (98 loc) · 3.78 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
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
apply plugin: 'signing'
group = 'io.voucherify.client'
version = '16.0.2'
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.+'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
}
}
repositories {
mavenCentral()
jcenter()
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
maven(MavenPublication) {
artifactId = 'voucherify-java-sdk'
from components.java
pom {
name = System.getenv('POM_NAME') ?: POM_NAME
description = System.getenv('POM_DESCRIPTION') ?: POM_DESCRIPTION
url = System.getenv('POM_URL') ?: POM_URL
licenses {
license {
name = System.getenv('POM_LICENCE_NAME') ?: POM_LICENCE_NAME
url = System.getenv('POM_LICENCE_URL') ?: POM_LICENCE_URL
distribution = System.getenv('POM_LICENCE_DIST') ?: POM_LICENCE_DIST
}
}
developers {
developer {
id = System.getenv('POM_DEVELOPER_ID') ?: POM_DEVELOPER_ID
name = System.getenv('POM_DEVELOPER_NAME') ?: POM_DEVELOPER_NAME
}
}
scm {
connection = System.getenv('POM_SCM_CONNECTION') ?: POM_SCM_CONNECTION
developerConnection = System.getenv('POM_SCM_DEV_CONNECTION') ?: POM_SCM_DEV_CONNECTION
url = System.getenv('POM_SCM_URL') ?: POM_SCM_URL
}
}
}
}
repositories {
maven {
def releasesRepoUrl = System.getenv('RELEASE_REPOSITORY_URL') ?: RELEASE_REPOSITORY_URL
def snapshotsRepoUrl = System.getenv('SNAPSHOT_REPOSITORY_URL') ?: SNAPSHOT_REPOSITORY_URL
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username = System.getenv('NEXUS_USERNAME') ?: NEXUS_USERNAME
password = System.getenv('NEXUS_PASSWORD') ?: NEXUS_PASSWORD
}
}
}
}
if (project.hasProperty('sign')) {
signing {
sign publishing.publications.maven
}
}
task execute(type:JavaExec) {
main = System.getProperty('mainClass')
classpath = sourceSets.main.runtimeClasspath
}
ext {
jakarta_annotation_version = "1.3.5"
}
dependencies {
implementation 'io.swagger:swagger-annotations:1.6.8'
implementation "com.google.code.findbugs:jsr305:3.0.2"
implementation 'com.squareup.okhttp3:okhttp:4.10.0'
implementation 'com.squareup.okhttp3:logging-interceptor:4.10.0'
implementation 'com.google.code.gson:gson:2.9.1'
implementation 'io.gsonfire:gson-fire:1.8.5'
implementation 'javax.ws.rs:jsr311-api:1.1.1'
implementation 'javax.ws.rs:javax.ws.rs-api:2.1.1'
implementation 'org.openapitools:jackson-databind-nullable:0.2.6'
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0'
implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version"
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.8.2'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.8.2'
testImplementation group: 'org.skyscreamer', name: 'jsonassert', version: '1.5.3'
testImplementation group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310', version: '2.12.5'
}