Skip to content
This repository was archived by the owner on Dec 17, 2020. It is now read-only.

Commit 8eb3023

Browse files
author
Rolf Smit
committed
Merged the install and upload bintray gradles files into one big gradle file.
1 parent 2cf872a commit 8eb3023

File tree

6 files changed

+67
-74
lines changed

6 files changed

+67
-74
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Android-Retainable-Tasks
2+
[ ![Download](https://api.bintray.com/packages/rolf-smit/maven/android-retainable-tasks/images/download.svg) ](https://bintray.com/rolf-smit/maven/android-retainable-tasks/_latestVersion)
3+
24
Android-Retainable-Tasks is an easy to use mini-library for easy asynchronous background tasking with callback support to the UI. This library is based on the Android `AsyncTask` implementation but with support for retaining tasks and therefore surviving configuration changes (orientation).
35

46
**Add it to your project**

build.gradle

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ buildscript {
1515

1616
allprojects {
1717
repositories {
18-
maven {
19-
url 'https://dl.bintray.com/rolf-smit/maven'
20-
}
2118
jcenter()
2219
}
2320
}

demo/build.gradle

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,17 @@ android {
2020
}
2121

2222
dependencies {
23-
compile fileTree(include: ['*.jar'], dir: 'libs')
24-
testCompile 'junit:junit:4.12'
23+
//compile project(':library')
24+
compile 'org.neotech.library:android-retainable-tasks:0.1.0'
25+
2526
compile 'com.android.support:appcompat-v7:23.2.0'
2627
compile 'com.android.support:design:23.2.0'
2728

28-
compile project(':library')
29-
//compile 'org.neotech.library:android-retainable-tasks:0.1.0'
29+
//LeakCanary is used to detect memory leaks in debug builds.
30+
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.3.1'
31+
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.3.1'
32+
testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.3.1'
3033

31-
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.3.1' // or 1.4-beta1
32-
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.3.1' // or 1.4-beta1
33-
testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.3.1' // or 1.4-beta1
34+
//Unit-testing
35+
testCompile 'junit:junit:4.12'
3436
}

library/bintray-install.gradle

Lines changed: 0 additions & 43 deletions
This file was deleted.

library/build.gradle

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,18 @@
11
apply plugin: 'com.android.library'
22

33
ext {
4-
5-
6-
/** JCenter/maven upload variables **/
7-
84
/**
9-
* Upload the library using:
5+
* Upload new library version:
106
* > gradlew install
117
* > gradlew bintrayUpload
128
*/
139

14-
// Where you will see your artifact in Bintray's web interface
15-
// The "bintrayName" should match the name of the Bintray repro.
1610
bintrayRepo = 'maven'
17-
bintrayName = 'android-retainable-tasks'
11+
bintrayName = 'android-retainable-tasks' //Should match the name of the Bintray online repository
1812

19-
// Maven metadata
13+
//Maven metadata
2014
publishedGroupId = 'org.neotech.library'
2115
libraryName = 'Android-Retainable-Tasks'
22-
// Save yourself a head ache, and set this equal to the name of the Android Studio library
23-
// module. The artifact name needs to match the name of the library.
2416
artifact = 'android-retainable-tasks'
2517

2618
libraryDescription = 'Android-Retainable-Tasks is an easy to use mini-library for easy asynchronous background tasking with callback support to the UI. This library is based on the Android AsyncTask implementation but with support for retaining tasks and therefore surviving configuration changes (orientation).'
@@ -36,14 +28,12 @@ ext {
3628
licenseName = 'The Apache Software License, Version 2.0'
3729
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
3830
allLicenses = ["Apache-2.0"]
39-
40-
4131
}
4232

43-
/**
44-
* Without this line the Bintray upload will fail as it uses the libraries directory name as artifactId
45-
*/
46-
archivesBaseName = 'android-retainable-tasks'
33+
//Without this line the Bintray upload will fail as it uses the module directory name as artifactId
34+
archivesBaseName = artifact
35+
group = publishedGroupId
36+
version = libraryVersion
4737

4838
android {
4939
compileSdkVersion 23
@@ -53,7 +43,7 @@ android {
5343
minSdkVersion 9
5444
targetSdkVersion 23
5545
versionCode 1
56-
versionName "${libraryVersion}"
46+
versionName = libraryVersion
5747
}
5848
buildTypes {
5949
release {
@@ -74,6 +64,4 @@ dependencies {
7464
javadocCompile 'com.android.support:appcompat-v7:23.2.0'
7565
}
7666

77-
78-
apply from: 'bintray-install.gradle'
79-
apply from: 'bintray-upload.gradle'
67+
apply from: 'publish-library.gradle'

library/bintray-upload.gradle renamed to library/publish-library.gradle

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,50 @@
1+
apply plugin: 'com.github.dcendents.android-maven'
2+
3+
group = publishedGroupId // Maven Group ID for the artifact
4+
5+
install {
6+
repositories.mavenInstaller {
7+
// This generates POM.xml with proper parameters
8+
pom {
9+
10+
project {
11+
packaging 'aar'
12+
groupId publishedGroupId
13+
artifactId artifact
14+
15+
// Add your description here
16+
name libraryName
17+
description libraryDescription
18+
url siteUrl
19+
20+
// Set your license
21+
licenses {
22+
license {
23+
name licenseName
24+
url licenseUrl
25+
}
26+
}
27+
developers {
28+
developer {
29+
id developerId
30+
name developerName
31+
email developerEmail
32+
}
33+
}
34+
scm {
35+
connection gitUrl
36+
developerConnection gitUrl
37+
url siteUrl
38+
39+
}
40+
}
41+
}
42+
}
43+
}
44+
45+
46+
47+
148
apply plugin: 'com.jfrog.bintray'
249

350
version = libraryVersion

0 commit comments

Comments
 (0)