Skip to content

Commit ae0dbe6

Browse files
committedDec 14, 2022
Bump gradle and AndroidPlugin version
Improve generation of Android javadoc. Bump Android compile/target SdkVersion. BuildToolsVersion `30.0.3` is the latest one compatible with AndroidPlugin 4.2.2 and java 1.8. Signed-off-by: Antonio Gisondi <antonio.gisondi@secomind.com>
1 parent 1cbe5ad commit ae0dbe6

File tree

7 files changed

+36
-18
lines changed

7 files changed

+36
-18
lines changed
 

‎CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1313
- Sending a non-numeric value on an endpoint with type Double now triggers an exception.
1414
### Changed
1515
- Data is now validated against their exact types.
16-
- Update Gradle to latest stable 7.2
16+
- Update Gradle to latest stable 7.6
1717
- [android] Update Android Gradle plugin and Android target version
1818

1919
## [1.0.4] - 2022-12-13

‎DeviceSDKAndroid/build.gradle

+17-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
apply plugin: 'com.android.library'
22

33
android {
4-
compileSdkVersion 31
4+
compileSdkVersion 33
55
buildToolsVersion "30.0.3"
66

77
defaultConfig {
88
minSdkVersion 23
9-
targetSdkVersion 31
9+
targetSdkVersion 33
1010
versionCode 1
1111
versionName project.version
1212

@@ -70,9 +70,22 @@ dependencies {
7070

7171
task javadoc(type: Javadoc) {
7272
failOnError false
73-
source = android.sourceSets.main.java.sourceFiles
73+
group = "Documentation"
74+
description = "Generate Javadoc"
75+
source = android.sourceSets.main.java.srcDirs
7476
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
75-
classpath += configurations.compile
77+
options.memberLevel = JavadocMemberLevel.PROTECTED
78+
options.addStringOption('Xmaxwarns', '1')
79+
options.addStringOption('Xmaxerrs', '1')
80+
options.links "https://docs.oracle.com/javase/8/docs/api"
81+
options.linksOffline "https://developer.android.com/reference",
82+
"${android.sdkDirectory}/docs/reference"
83+
android.libraryVariants.all { variant ->
84+
if (variant.name == 'release') {
85+
owner.classpath += variant.javaCompileProvider.get().classpath
86+
}
87+
}
88+
exclude '**/R.html', '**/R.*.html', '**/index.html'
7689
}
7790

7891
ext {

‎build.gradle

+2-5
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,13 @@ buildscript {
55
google()
66
mavenCentral()
77
}
8-
dependencies {
9-
classpath 'com.android.tools.build:gradle:4.2.0'
10-
// NOTE: Do not place your application dependencies here; they belong
11-
// in the individual module build.gradle files
12-
}
138
}
149

1510
plugins {
1611
id 'com.diffplug.spotless' version '5.5.1'
1712
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
13+
id 'com.android.application' version '4.2.2' apply false
14+
id 'com.android.library' version '4.2.2' apply false
1815
}
1916

2017
allprojects {

‎examples/Android/build.gradle

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
apply plugin: 'com.android.application'
22

33
android {
4-
compileSdkVersion 31
4+
compileSdkVersion 33
55
buildToolsVersion "30.0.3"
66

77
defaultConfig {
88
applicationId "org.astarteplatform.devicesdk.android.examples"
99
minSdkVersion 23
10-
targetSdkVersion 31
10+
targetSdkVersion 33
1111
versionCode 1
1212
versionName "1.0"
1313

@@ -31,9 +31,9 @@ dependencies {
3131
implementation fileTree(dir: "libs", include: ["*.jar"])
3232
implementation 'androidx.appcompat:appcompat:1.2.0'
3333
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
34-
testImplementation 'junit:junit:4.13'
35-
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
36-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
34+
testImplementation 'junit:junit:4.13.2'
35+
androidTestImplementation 'androidx.test.ext:junit:1.1.4'
36+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0'
3737
}
3838

3939
tasks.withType(Javadoc).all { enabled = false }

‎examples/Android/src/main/AndroidManifest.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
android:theme="@style/AppTheme">
1212
<activity
1313
android:name=".MainActivity"
14-
android:exported="false">
14+
android:exported="true">
1515
<intent-filter>
1616
<action android:name="android.intent.action.MAIN" />
1717

@@ -20,4 +20,4 @@
2020
</activity>
2121
</application>
2222

23-
</manifest>
23+
</manifest>

‎gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-all.zip

‎settings.gradle

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
pluginManagement {
2+
repositories {
3+
gradlePluginPortal()
4+
google()
5+
mavenCentral()
6+
}
7+
}
8+
19
include ':DeviceSDK'
210
include ':DeviceSDKAndroid'
311
include ':DeviceSDKGeneric'

0 commit comments

Comments
 (0)
Please sign in to comment.