-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.gradle
103 lines (89 loc) · 3.34 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
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
withSourcesJar()
withJavadocJar()
}
repositories {
mavenCentral()
}
dependencies {
testImplementation 'junit:junit:4.13.1'
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.moshi:moshi-adapters:1.14.0'
implementation 'com.squareup.moshi:moshi:1.14.0'
implementation 'com.squareup.retrofit2:converter-moshi:2.9.0'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.12.7.1'
implementation 'com.google.guava:guava:31.1-jre'
implementation 'org.apache.logging.log4j:log4j-api:2.19.0'
implementation 'org.apache.logging.log4j:log4j-core:2.19.0'
compileOnly 'org.projectlombok:lombok:1.18.24'
annotationProcessor 'org.projectlombok:lombok:1.18.24'
testCompileOnly 'org.projectlombok:lombok:1.18.24'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.24'
testImplementation 'com.squareup.okhttp3:mockwebserver:4.10.0'
}
// Configure group ID, artifact ID, and version
group = "com.smileidentity"
archivesBaseName = "smile-identity-core"
version = "2.1.5"
def apiVersion = "0.2.0"
// Build, sign, and upload
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
pom {
name = 'smile-identity-core'
description = 'The Official Smile Identity library'
packaging = 'jar'
url = 'https://github.com/smileidentity/smile-identity-core-java'
scm {
connection = 'scm:git:git://github.com/smileidentity/smile-identity-core-java.git'
developerConnection = 'scm:git:ssh://github.com:smileidentity/smile-identity-core-java.git'
url = 'https://github.com/smileidentity/smile-identity-core-java/tree/master'
}
licenses {
license {
name = 'The MIT License (MIT)'
url = 'http://opensource.org/licenses/MIT'
distribution = 'repo'
}
}
developers {
developer {
id = 'Support'
name = 'Smile Identity'
email = '[email protected]'
organization = 'Smile Identity'
organizationUrl = 'https://www.usesmileid.com'
}
}
}
}
}
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 = findProperty('ossrhUsername')
password = findProperty('ossrhPassword')
}
}
}
}
signing {
sign publishing.publications.mavenJava
}
task createProperties(type: WriteProperties) {
outputFile = file("${buildDir}/src/main/resources/project.properties")
property('version', project.version)
property('apiVersion', apiVersion)
}