Skip to content

Commit be2be67

Browse files
authored
Merge pull request #25 from tumblr/plugin-dsl-and-javadoc-improvements
Plugin DSL and javadoc improvements
2 parents 4bc62e7 + d524e15 commit be2be67

File tree

5 files changed

+30
-41
lines changed

5 files changed

+30
-41
lines changed

backboard-example/build.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
apply plugin: 'com.android.application'
1+
plugins {
2+
id "com.android.application"
3+
}
24

35
android {
46
compileSdkVersion rootProject.ext.compileSdkVersion

backboard-example/src/main/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
android:theme="@style/AppTheme" >
1010
<activity
1111
android:name=".BackboardActivity"
12+
android:exported="true"
1213
android:label="@string/app_name" >
1314
<intent-filter>
1415
<action android:name="android.intent.action.MAIN" />

backboard/build.gradle

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
apply plugin: 'com.android.library'
2-
apply plugin: 'checkstyle'
1+
plugins {
2+
id "com.android.library"
3+
id "checkstyle"
4+
}
35

46
android {
57
compileSdkVersion rootProject.ext.compileSdkVersion
@@ -19,12 +21,9 @@ android {
1921

2022
libraryVariants.all { variant ->
2123
task("javadoc${variant.name}", type: Javadoc) {
22-
source = variant.javaCompile.source
23-
ext.androidJar = "${android.sdkDirectory}/platforms/${android.compileSdkVersion}/android.jar"
24-
classpath = files(android.sourceSets.main.java.srcDirs) + files(ext.androidJar)
24+
source android.sourceSets.main.java.srcDirs
25+
classpath = variant.javaCompileProvider.get().classpath + files(project.android.getBootClasspath()) + files("$buildDir/intermediates/classes/${variant.name}")
2526
options.links("http://docs.oracle.com/javase/7/docs/api/")
26-
options.linksOffline("http://developer.android.com/reference/", "${android.sdkDirectory}/docs/reference/")
27-
options.links("http://facebook.github.io/rebound/javadocs/")
2827
exclude '**/BuildConfig.java'
2928
exclude '**/R.java'
3029
}

build.gradle

Lines changed: 7 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,14 @@
1-
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2-
3-
buildscript {
4-
repositories {
5-
google()
6-
jcenter()
7-
}
8-
dependencies {
9-
// NOTE - this is referencing a local variable that you must set in your gradle.properties
10-
// in the top level folder.
11-
//
12-
// Example:
13-
//
14-
// project.ext {
15-
// localBuildTools = com.android.tools.build:gradle:0.14.1
16-
// }
17-
//
18-
if (project.hasProperty('localBuildTools')) {
19-
classpath project.ext.localBuildTools
20-
} else {
21-
// Fallback to newest build tools if property not set
22-
classpath 'com.android.tools.build:gradle:7.1.1'
23-
}
24-
}
25-
}
26-
271
allprojects {
282
repositories {
29-
google()
30-
jcenter()
3+
google()
4+
mavenCentral()
315
}
326
}
337

348
ext {
35-
compileSdkVersion = 28
36-
minSdkVersion = 14
37-
targetSdkVersion = 28
38-
supportAnnotation = 'androidx.annotation:annotation:1.0.0'
39-
facebookRebound = "com.facebook.rebound:rebound:0.3.8"
9+
compileSdkVersion = 31
10+
minSdkVersion = 14
11+
targetSdkVersion = 31
12+
supportAnnotation = 'androidx.annotation:annotation:1.0.0'
13+
facebookRebound = "com.facebook.rebound:rebound:0.3.8"
4014
}

settings.gradle

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,14 @@
1+
pluginManagement {
2+
gradle.ext.agpVersion = '7.1.1'
3+
4+
plugins {
5+
id "com.android.application" version gradle.ext.agpVersion
6+
id "com.android.library" version gradle.ext.agpVersion
7+
}
8+
repositories {
9+
google()
10+
mavenCentral()
11+
}
12+
}
13+
114
include ':backboard-example', ':backboard'

0 commit comments

Comments
 (0)