Skip to content

Commit 3a494b2

Browse files
configured android-analytics bintray package
1 parent 3dd3454 commit 3a494b2

File tree

1 file changed

+126
-0
lines changed

1 file changed

+126
-0
lines changed

android-analytics/android/build.gradle

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
apply plugin: 'com.android.library'
22
apply plugin: 'kotlin-android'
3+
apply plugin: 'com.github.dcendents.android-maven'
4+
apply plugin: 'com.jfrog.bintray'
5+
6+
buildscript {
7+
repositories {
8+
jcenter()
9+
}
10+
dependencies {
11+
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
12+
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
13+
}
14+
}
15+
16+
17+
def versionNameStr = project.version
318

419
android {
520
compileSdkVersion 28
@@ -38,3 +53,114 @@ dependencies {
3853
repositories {
3954
mavenCentral()
4055
}
56+
57+
58+
59+
60+
ext {
61+
bintrayRepo = 'analytics'
62+
bintrayName = 'android-analytics'
63+
64+
publishedGroupId = 'com.sofakingforever.analytics'
65+
artifact = 'android-analyticss'
66+
libraryName = 'android'
67+
libraryVersion = versionNameStr
68+
69+
libraryDescription = 'Android Interface for kotlin-analytics.'
70+
71+
siteUrl = 'https://github.com/sofakingforever/solid-kotlin-analytics'
72+
gitUrl = 'https://github.com/sofakingforever/solid-kotlin-analytics.git'
73+
74+
75+
developerId = 'sofakingforever'
76+
developerName = 'sofakingforever'
77+
developerEmail = '[email protected]'
78+
79+
licenseName = 'The Apache Software License, Version 2.0'
80+
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
81+
allLicenses = ["Apache-2.0"]
82+
}
83+
group = publishedGroupId
84+
version = libraryVersion
85+
86+
install {
87+
repositories.mavenInstaller {
88+
pom.project {
89+
packaging 'aar'
90+
groupId publishedGroupId
91+
artifactId artifact
92+
93+
name libraryName
94+
description libraryDescription
95+
url siteUrl
96+
97+
licenses {
98+
license {
99+
name licenseName
100+
url licenseUrl
101+
}
102+
}
103+
developers {
104+
developer {
105+
id developerId
106+
name developerName
107+
email developerEmail
108+
}
109+
}
110+
scm {
111+
connection gitUrl
112+
developerConnection gitUrl
113+
url siteUrl
114+
}
115+
}
116+
}
117+
}
118+
119+
// Todo - Re-enable Javadocs and understand why it's causing trouble when compiling
120+
tasks.withType(Javadoc).all {
121+
enabled = false
122+
}
123+
task sourcesJar(type: Jar) {
124+
classifier = 'sources'
125+
from android.sourceSets.main.java.srcDirs
126+
}
127+
128+
task javadoc(type: Javadoc) {
129+
source = android.sourceSets.main.java.srcDirs
130+
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
131+
}
132+
133+
task javadocJar(type: Jar, dependsOn: javadoc) {
134+
classifier = 'javadoc'
135+
from javadoc.destinationDir
136+
}
137+
138+
artifacts {
139+
archives javadocJar
140+
archives sourcesJar
141+
}
142+
143+
Properties properties = new Properties()
144+
properties.load(project.rootProject.file('local.properties').newDataInputStream())
145+
146+
bintray {
147+
user = properties.getProperty("bintray.user")
148+
key = properties.getProperty("bintray.apikey")
149+
150+
configurations = ['archives']
151+
pkg {
152+
repo = bintrayRepo
153+
name = bintrayName
154+
desc = libraryDescription
155+
websiteUrl = siteUrl
156+
vcsUrl = gitUrl
157+
licenses = allLicenses
158+
dryRun = false
159+
publish = true
160+
override = false
161+
publicDownloadNumbers = true
162+
version {
163+
desc = libraryDescription
164+
}
165+
}
166+
}

0 commit comments

Comments
 (0)