Skip to content

Commit 8b2e831

Browse files
committed
#4 Adding bintray support
1 parent 8086680 commit 8b2e831

File tree

2 files changed

+93
-2
lines changed

2 files changed

+93
-2
lines changed

bubbles/build.gradle

+91-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
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+
def projectVersion = "0.1"
7+
def projectGroupId = "com.github.madrapps"
8+
def siteUrl = 'https://github.com/Madrapps/Bubbles'
9+
def gitUrl = 'https://github.com/Madrapps/Bubbles.git'
10+
def fullName = "com.github.madrapps:bubbles"
11+
12+
version = projectVersion
13+
group = projectGroupId
314

415
android {
516
compileSdkVersion 26
@@ -10,7 +21,7 @@ android {
1021
minSdkVersion 14
1122
targetSdkVersion 26
1223
versionCode 1
13-
versionName "1.0"
24+
versionName version
1425

1526
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1627

@@ -35,6 +46,85 @@ dependencies {
3546
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
3647

3748
}
49+
3850
repositories {
3951
mavenCentral()
52+
google()
53+
}
54+
55+
install {
56+
repositories.mavenInstaller {
57+
pom {
58+
project {
59+
packaging 'aar'
60+
61+
groupId projectGroupId
62+
63+
name fullName
64+
description = 'An animated action menu that could hold any views (especially FloatingActionButton). The animation and the layout of the menu can be customized. This is an android library.'
65+
url siteUrl
66+
67+
licenses {
68+
license {
69+
name 'The Apache Software License, Version 2.0'
70+
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
71+
}
72+
}
73+
developers {
74+
developer {
75+
id 'instrap'
76+
name 'Madrapps'
77+
email 'madrasappfactory@gmail.com'
78+
}
79+
}
80+
scm {
81+
connection gitUrl
82+
developerConnection gitUrl
83+
url siteUrl
84+
}
85+
}
86+
}
87+
}
88+
}
89+
90+
task sourcesJar(type: Jar) {
91+
from android.sourceSets.main.java.srcDirs
92+
classifier = 'sources'
93+
}
94+
95+
task javadoc(type: Javadoc) {
96+
excludes = ['**/*.kt'] // < ---- Exclude all kotlin files from javadoc file.
97+
source = android.sourceSets.main.java.srcDirs
98+
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
4099
}
100+
101+
task javadocJar(type: Jar, dependsOn: javadoc) {
102+
classifier = 'javadoc'
103+
from javadoc.destinationDir
104+
}
105+
106+
artifacts {
107+
archives javadocJar
108+
archives sourcesJar
109+
}
110+
111+
bintray {
112+
user = System.getenv('bintray_user')
113+
key = System.getenv('bintray_apikey')
114+
115+
configurations = ['archives']
116+
pkg {
117+
repo = "maven"
118+
name = fullName
119+
userOrg = "madrapps"
120+
websiteUrl = siteUrl
121+
vcsUrl = gitUrl
122+
licenses = ["Apache-2.0"]
123+
publish = true
124+
version {
125+
gpg {
126+
sign = true
127+
}
128+
}
129+
}
130+
}

build.gradle

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ buildscript {
99
dependencies {
1010
classpath 'com.android.tools.build:gradle:3.0.0-beta6'
1111
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
12-
12+
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
13+
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
1314
// NOTE: Do not place your application dependencies here; they belong
1415
// in the individual module build.gradle files
1516
}

0 commit comments

Comments
 (0)