Skip to content
This repository has been archived by the owner on May 12, 2020. It is now read-only.

Added tools to android components #4

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 3 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ language: android

android:
components:
- tools
- platform-tools

jdk:
Expand All @@ -14,29 +15,12 @@ before_install:
- echo "$LICENSES_HASH_TWO" >> "$ANDROID_HOME/licenses/android-sdk-license"
# Install the rest of tools (e.g., avdmanager)
- sdkmanager tools
# Install the system image
- sdkmanager "system-images;android-18;default;armeabi-v7a"
# Create and start emulator for the script. Meant to race the install task.
- echo no | avdmanager create avd --force -n test -k "system-images;android-18;default;armeabi-v7a"
- $ANDROID_HOME/emulator/emulator -avd test -no-audio -no-window > /dev/null 2>&1 &

install: ./gradlew build assembleAndroidTest --stacktrace

before_script:
- android-wait-for-emulator
- adb shell input keyevent 82
install: ./gradlew build --stacktrace

script:
- ./gradlew check --stacktrace

after_success:
- .buildscript/deploy_snapshot.sh

env:
global:
- secure: "TODO"
- secure: "TODO"

branches:
except:
- gh-pages
Expand All @@ -49,3 +33,4 @@ sudo: false
cache:
directories:
- $HOME/.gradle

8 changes: 3 additions & 5 deletions auto-value-bundle/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,10 @@

import org.gradle.internal.jvm.Jvm

plugins {
id 'java-library'
}
apply plugin: 'java'

sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7

dependencies {
implementation deps.apt.androidApi
Expand Down
40 changes: 19 additions & 21 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,33 +15,31 @@
*/

subprojects {
buildscript {
repositories {
jcenter()
google()
apply from: rootProject.file('gradle/dependencies.gradle')
buildscript {
repositories {
jcenter()
google()
}
}
}

repositories {
jcenter()
google()
}

apply plugin: 'checkstyle'
repositories {
jcenter()
google()
}

checkstyle { ->
rootProject
configFile rootProject.file('config/checkstyle/checkstyle.xml')
}
afterEvaluate {
if (plugins.hasPlugin('com.android.library')) {
project.android.libraryVariants.all {
it.generateBuildConfig.enabled = false
}
}
}
}

task wrapper(type: Wrapper) {
gradleVersion = '4.5.1'
distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip"
}

task clean(type: Delete) {
delete rootProject.buildDir
gradleVersion = '4.6'
distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip"
}

apply from: 'gradle/dependencies.gradle'
2 changes: 1 addition & 1 deletion gradle/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def build = [
minSdkVersion: 16,
targetSdkVersion: 27,
gradlePlugins: [
android: 'com.android.tools.build:gradle:3.0.1',
android: 'com.android.tools.build:gradle:2.3.0',
],
guava: "com.google.guava:guava:24.0-jre",
]
Expand Down
10 changes: 5 additions & 5 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ check.dependsOn 'checkstyle'

dependencies {
annotationProcessor deps.apt.autoValue
annotationProcessor project(":autovalue-bundle-extension")
annotationProcessor project(":auto-value-bundle")

implementation deps.support.appcompat
implementation deps.apt.autoValue
implementation deps.external.gson
compile deps.support.appcompat
compile deps.apt.autoValue
compile deps.external.gson

compileOnly project(":autovalue-bundle-extension")
provided project(":auto-value-bundle")

testCompile deps.test.junit
}
Expand Down
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
include ':auto-value-bundle'
include ':autovalue-bundle-extension'
include ':sample'