Skip to content

Commit

Permalink
Merge branch 'master' into fix-crash-on-job-stop
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgyoung committed Jul 5, 2019
2 parents 4d58053 + 57a5f1c commit ffdfe84
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 74 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ replacing `${altbeacon.version}` with the version you wish to use.
## How to build this Library

This project uses an AndroidStudio/gradle build system and is known working with Android Studio
3.2.1 and Gradle 4.10.3
3.4.1 and Gradle 5.1.1

Key Gradle build targets:

./gradlew test # run unit tests
./gradlew build # development build
./gradlew release -Prelease # release build
./gradlew generateJavadoc
./gradlew generateReleaseJavadoc

## License

Expand Down
10 changes: 10 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ buildscript {
repositories {
google()
jcenter()
mavenCentral()
repositories {
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
}
}

dependencies {
Expand All @@ -10,6 +14,12 @@ buildscript {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.1'
//noinspection GradleDependency
classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:3.0.3'
// The 3.0 version of this plugin does not support Gradle 5, The latest source does support
// Grale 5. So we are using a snapshot until the 4.0 version is released.
//classpath "com.vanniktech:gradle-android-javadoc-plugin:0.3.0"
dependencies {
classpath "com.vanniktech:gradle-android-javadoc-plugin:0.4.0-SNAPSHOT"
}
}
}
allprojects {
Expand Down
31 changes: 0 additions & 31 deletions gradle/eclipse.gradle

This file was deleted.

39 changes: 7 additions & 32 deletions gradle/package.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,41 +17,16 @@ task renameAarForRelease(type: Copy, dependsOn: build) {
}
}

task distribution(dependsOn: [bundleEclipse, build, clean, renameAarForRelease]) << {
println "Building with version=$version"
}

task release(dependsOn: 'distribution') << {
println('Doing release build')
}

android.libraryVariants.all { variant ->

task("generate${variant.name}Javadoc", type: Javadoc) {
title = "Android Beacon Library $version API"
description "Generates Javadoc for $variant.name."
source = variant.javaCompile.source
ext.androidJar =
"${android.sdkDirectory}/platforms/${android.compileSdkVersion}/android.jar"
//Refer to https://stackoverflow.com/a/50833438/4068957
doFirst { classpath = files(variant.javaCompile.classpath.files, ext.androidJar)}
options.linksOffline "http://d.android.com/reference/", "${android.sdkDirectory}/docs/reference"
exclude '**/BuildConfig.java'
exclude '**/R.java'
task distribution(dependsOn: [build, clean, renameAarForRelease]) {
doLast {
println "Building with version=$version"
}

}

task generateJavadoc(type: Javadoc, dependsOn: project.configurations.doclava) {
failOnError = true
title = null
source = android.sourceSets.main.java.srcDirs
options.doclet = "com.google.doclava.Doclava"
options.docletpath = configurations.doclava.files.asType(List)
classpath +=
project.files(android.getBootClasspath().join(File.pathSeparator)) + configurations.compile

destinationDir = file("../javadocs/")
task release(dependsOn: 'distribution') {
doLast {
println('Doing release build')
}
}

build.mustRunAfter clean
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
15 changes: 7 additions & 8 deletions lib/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apply plugin: 'com.android.library'
apply from: '../gradle/eclipse.gradle'
apply from: '../gradle/version.gradle'
apply plugin: "com.vanniktech.android.javadoc"

android {
compileSdkVersion 28
Expand Down Expand Up @@ -45,12 +45,11 @@ android {
}
}

configurations {
doclava
}

dependencies {

implementation fileTree ( dir: 'libs', include: ['*.jar'] )
// The support library is needed for
// LocalBroadcastManager,
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:support-annotations:28.0.0'

Expand All @@ -65,8 +64,8 @@ dependencies {
androidTestImplementation 'com.android.support.test:rules:1.0.2'
androidTestImplementation 'org.apache.commons:commons-math3:3.6.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

doclava 'com.google.doclava:doclava:1.0.6'
}

apply from: '../gradle/package.gradle'
apply from: '../gradle/package.gradle'


0 comments on commit ffdfe84

Please sign in to comment.