Skip to content

Commit 69afbbd

Browse files
committed
Travis/Bintray support
1 parent 81e0a4e commit 69afbbd

3 files changed

Lines changed: 150 additions & 3 deletions

File tree

.travis.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
language: android
2+
sudo: false
3+
install: true
4+
5+
jdk: oraclejdk8
6+
android:
7+
components:
8+
- tools
9+
- platform-tools
10+
11+
# The BuildTools version used by your project
12+
- build-tools-25.0.2
13+
14+
# The SDK version used to compile your project
15+
- android-25
16+
17+
# Specify at least one system image,
18+
# if you need to run emulator(s) during your tests
19+
- sys-img-armeabi-v7a-android-21
20+
21+
env:
22+
global:
23+
# install timeout in minutes (2 minutes by default)
24+
- ADB_INSTALL_TIMEOUT=8
25+
26+
before_install:
27+
- mkdir "$ANDROID_HOME/licenses" || true
28+
- echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > "$ANDROID_HOME/licenses/android-sdk-license"
29+
- echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "$ANDROID_HOME/licenses/android-sdk-preview-license"
30+
31+
# Emulator Management: Create, Start and Wait
32+
before_script:
33+
- echo no | android create avd --force -n test -t android-21 --abi armeabi-v7a
34+
- emulator -avd test -no-skin -no-audio -no-window &
35+
- android-wait-for-emulator
36+
- adb shell input keyevent 82 &
37+
38+
script:
39+
- android list target
40+
- ./gradlew connectedAndroidTest
41+
42+
cache:
43+
directories:
44+
- '$HOME/.m2/repository'
45+
- '$HOME/.gradle'
46+
- '.gradle'

asyncquery/build.gradle

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11
apply plugin: 'com.android.library'
2+
apply plugin: 'com.github.dcendents.android-maven'
3+
apply plugin: "com.jfrog.bintray"
4+
5+
def projectVersion = "1.0.0"
6+
def projectGroupId = "com.github.madrapps"
7+
def siteUrl = 'https://github.com/Madrapps/AsyncQuery'
8+
def gitUrl = 'https://github.com/Madrapps/AsyncQuery.git'
9+
def fullName = "com.github.madrapps:asyncquery"
10+
11+
version = projectVersion
12+
group = projectGroupId
13+
214

315
android {
416
compileSdkVersion 25
@@ -29,3 +41,87 @@ dependencies {
2941
compile 'com.android.support:appcompat-v7:25.3.1'
3042
testCompile 'junit:junit:4.12'
3143
}
44+
45+
46+
install {
47+
repositories.mavenInstaller {
48+
pom {
49+
project {
50+
packaging 'aar'
51+
52+
groupId projectGroupId
53+
54+
name fullName
55+
description = 'Improved AsyncQueryHandler that handles BulkInsert operation Edit'
56+
url siteUrl
57+
58+
licenses {
59+
license {
60+
name 'The Apache Software License, Version 2.0'
61+
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
62+
}
63+
}
64+
developers {
65+
developer {
66+
id 'instrap'
67+
name 'Madrapps'
68+
email 'madrasappfactory@gmail.com'
69+
}
70+
}
71+
scm {
72+
connection gitUrl
73+
developerConnection gitUrl
74+
url siteUrl
75+
}
76+
}
77+
}
78+
}
79+
}
80+
81+
task sourcesJar(type: Jar) {
82+
from android.sourceSets.main.java.srcDirs
83+
classifier = 'sources'
84+
}
85+
86+
task javadoc(type: Javadoc) {
87+
source = android.sourceSets.main.java.srcDirs
88+
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
89+
}
90+
91+
task javadocJar(type: Jar, dependsOn: javadoc) {
92+
classifier = 'javadoc'
93+
from javadoc.destinationDir
94+
}
95+
96+
artifacts {
97+
archives javadocJar
98+
archives sourcesJar
99+
}
100+
101+
bintray {
102+
user = System.getenv('bintray_user')
103+
key = System.getenv('bintray_apikey')
104+
105+
configurations = ['archives']
106+
pkg {
107+
repo = "maven"
108+
name = fullName
109+
userOrg = "madrapps"
110+
websiteUrl = siteUrl
111+
vcsUrl = gitUrl
112+
licenses = ["Apache-2.0"]
113+
publish = true
114+
version {
115+
gpg {
116+
sign = true
117+
}
118+
}
119+
}
120+
}
121+
122+
repositories {
123+
mavenCentral()
124+
maven {
125+
url "https://maven.google.com"
126+
}
127+
}

build.gradle

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,23 @@
33
buildscript {
44
repositories {
55
jcenter()
6+
maven {
7+
url "https://maven.google.com"
8+
}
69
}
710
dependencies {
811
classpath 'com.android.tools.build:gradle:2.3.2'
9-
10-
// NOTE: Do not place your application dependencies here; they belong
11-
// in the individual module build.gradle files
12+
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
13+
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
1214
}
1315
}
1416

1517
allprojects {
1618
repositories {
1719
jcenter()
20+
maven {
21+
url "https://maven.google.com"
22+
}
1823
}
1924
}
2025

0 commit comments

Comments
 (0)