-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathbuild.gradle
138 lines (124 loc) · 4.48 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
buildscript {
repositories {
mavenCentral()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.4.0'
}
}
plugins {
id 'java'
id 'maven-publish'
id 'signing'
}
group = 'com.treasuredata'
version = '1.1.0'
description = 'Android SDK for Treasure Data Cloud'
java.sourceCompatibility = JavaVersion.VERSION_1_8
java.targetCompatibility = JavaVersion.VERSION_1_8
repositories {
mavenCentral()
mavenLocal()
google()
}
dependencies {
implementation 'org.komamitsu:android-logger-bridge:0.0.2'
implementation 'com.fasterxml.jackson.jr:jackson-jr-objects:2.17.0'
implementation 'com.treasuredata:keen-client-java-core:3.0.1'
compileOnly 'com.google.android:android:4.1.1.4'
// testImplementation 'com.google.android.gms:play-services-ads:23.0.0'
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.mockito:mockito-core:5.3.1'
testImplementation 'com.squareup.okhttp3:mockwebserver:3.6.0'
testImplementation 'com.google.android:android:4.1.1.4'
}
task fatJar(type: Jar) {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
dependsOn configurations.runtimeClasspath
from { configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
// The name "shaded" here is just to be consistent with old packaged
// when we were still maven-shade-plugin to make the fat JAR, no classes are actually get shaded or shadowed.
// We could this into "-all" classifier, which is less misleading
archiveClassifier = 'shaded'
}
task sourcesJar(type: Jar) {
from sourceSets.main.allJava
archiveClassifier = 'sources'
}
task javadocJar(type: Jar) {
from javadoc
archiveClassifier = 'javadoc'
}
task javadocSite(type: Javadoc) {
failOnError true
source = sourceSets.main.allJava
classpath = sourceSets.main.compileClasspath + sourceSets.main.output // This is to compile excluded internal files as well
include 'com/treasuredata/android/**'
exclude 'com/treasuredata/android/billing/internal/**'
options.noTimestamp true
destinationDir = file("${rootDir}/docs")
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact fatJar
artifact sourcesJar
artifact javadocJar
pom {
name = 'Android SDK for Treasure Data Cloud'
description = 'Android SDK for Treasure Data Cloud'
url = 'https://github.com/treasure-data/td-android-sdk'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution = 'repo'
}
}
developers {
developer {
id = 'komamitsu'
name = 'Mitsunori Komatsu'
email = '[email protected]'
}
developer {
id = 'mcaramello'
name = 'Michele Caramello'
email = '[email protected]'
}
developer {
id = 'huylenq'
name = 'Huy Le'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:https://github.com/treasure-data/td-android-sdk.git'
developerConnection = 'scm:git:[email protected]:treasure-data/td-android-sdk.git'
url = 'https://github.com/treasure-data/td-android-sdk'
}
issueManagement {
system = 'GitHub'
url = 'https://github.com/treasure-data/td-android-sdk/issues'
}
}
}
}
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('sonatypeTokenUsername')
password findProperty('sonatypeTokenPassword')
}
}
}
}
signing {
sign publishing.publications.mavenJava
}