Skip to content
Merged
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
32 changes: 23 additions & 9 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push, pull_request, workflow_dispatch]

jobs:
test_Android:
runs-on: macOS-latest
runs-on: ubuntu-latest
steps:

- name: Checkout
Expand All @@ -15,15 +15,29 @@ jobs:
- name: Setup JDK
uses: actions/setup-java@v1
with:
java-version: 11

- name: Sdl Android Tests
# For more info, please check out: https://github.com/marketplace/actions/android-emulator-runner
java-version: 17

- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
ls -l /dev/kvm || true

- name: SDL Android Tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
script: ./android/gradlew -p ./android :sdl_android:connectedCheck

api-level: 36
target: google_apis
arch: x86_64
profile: pixel_7
ram-size: 2048M
disk-size: 4096M
disable-animations: true
emulator-boot-timeout: 1200
emulator-options: "-no-window -no-snapshot -no-audio"
script: ./android/gradlew -p ./android :sdl_android:connectedDebugAndroidTest

- name: Hello Sdl Android Tests
run: ./android/gradlew -p ./android/hello_sdl_android test

Expand All @@ -33,7 +47,7 @@ jobs:
yml: ./codecov.yml

test_Java:
runs-on: macOS-latest
runs-on: ubuntu-latest
steps:

- name: Checkout
Expand Down
42 changes: 3 additions & 39 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,13 @@
# 5.7.0 Release Notes
# 5.8.0 Release Notes

## Summary:

|| Version|
|---|---|
| **Protocol** | 5.4.1 |
| **RPC** | 8.0.0 |
| **Tested Targeting** | Android 34 |
| **Tested Targeting** | Android 36 |

## Bug Fix / Enhancements:

- [Add pending intent to ping intents] (https://github.com/smartdevicelink/sdl_java_suite/pull/1844

- [Fixes #1845 typo in SdlBroadcastReceiver for uncaughtException handler](https://github.com/smartdevicelink/sdl_java_suite/pull/1846

- [Bugfix/issue #1842 - NPE in BaseTextAndGraphicsManager](https://github.com/smartdevicelink/sdl_java_suite/pull/1847

- [Fix case for UncaughtExceptionHandler in SdlBroadcastReceiver for RemoteServiceException](https://github.com/smartdevicelink/sdl_java_suite/pull/1849

- [Update gradle to 7.4.2](https://github.com/smartdevicelink/sdl_java_suite/pull/1853

- [Fix NPE in SdlRouterService](https://github.com/smartdevicelink/sdl_java_suite/pull/1870

- [Bugfix/issue 1867 Bluetooth notification error fix](https://github.com/smartdevicelink/sdl_java_suite/pull/1868

- [Clean LifecycleManager before closing](https://github.com/smartdevicelink/sdl_java_suite/pull/1866

- [Move router service message sending to its own thread](https://github.com/smartdevicelink/sdl_java_suite/pull/1871

- [Bugfix/issue 1863 update gradle build variants for hello_sdl](https://github.com/smartdevicelink/sdl_java_suite/pull/1864

- [Android 14 add package to PendingIntents in RouterService](https://github.com/smartdevicelink/sdl_java_suite/pull/1862

- [Android 14 Runtime registered broadcast receivers export behavior](https://github.com/smartdevicelink/sdl_java_suite/pull/1858

- [Add logic to handle RAI response failure](https://github.com/smartdevicelink/sdl_java_suite/pull/1873

- [Android 14 foreground service type required](https://github.com/smartdevicelink/sdl_java_suite/pull/1860

- [Update integration validator with latest permissions and checks for exported](https://github.com/smartdevicelink/sdl_java_suite/pull/1875

- [Fix SDLLockScreenActivityEspressoTest for newer devices](https://github.com/smartdevicelink/sdl_java_suite/pull/1877

- [Remove only app logic for device listener start](https://github.com/smartdevicelink/sdl_java_suite/pull/1879)

- [Fix NPE in TransportBroker](https://github.com/smartdevicelink/sdl_java_suite/pull/1882)

**Full Changelog**: https://github.com/smartdevicelink/sdl_java_suite/compare/5.6.1...RC_5.7.0
- [Update to gradle version 8.13 and target API level 36] (https://github.com/smartdevicelink/sdl_java_suite/pull/1886)
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.7.0
5.8.0
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'
classpath 'com.android.tools.build:gradle:8.13.0'


// NOTE: Do not place your application dependencies here; they belong
Expand Down
3 changes: 3 additions & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
android.enableJetifier=true
android.defaults.buildfeatures.buildconfig=true
android.nonFinalResIds=false
android.nonTransitiveRClass=false
android.useAndroidX=true
org.gradle.jvmargs=-Xmx1536m

Expand Down
2 changes: 1 addition & 1 deletion android/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-7.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip
11 changes: 6 additions & 5 deletions android/hello_sdl_android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 34
compileSdkVersion 36
defaultConfig {
applicationId "com.sdl.hellosdlandroid"
minSdkVersion 16
targetSdkVersion 34
minSdkVersion 21
targetSdkVersion 36
versionCode 1
versionName "1.0"
resValue "string", "app_name", "Hello Sdl Android"
Expand Down Expand Up @@ -61,6 +61,7 @@ android {
lintOptions {
disable 'GoogleAppIndexingWarning'
}
namespace 'com.sdl.hellosdlandroid'
}


Expand All @@ -69,7 +70,7 @@ dependencies {
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.appcompat:appcompat:1.7.1'
implementation project(path: ':sdl_android')
testImplementation 'junit:junit:4.12'
testImplementation 'junit:junit:4.13.2'
}
3 changes: 1 addition & 2 deletions android/hello_sdl_android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.sdl.hellosdlandroid">
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT"
Expand Down
74 changes: 49 additions & 25 deletions android/sdl_android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,31 @@
apply plugin: 'com.android.library'
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
}
}

plugins {
id "com.android.library"
id "com.vanniktech.maven.publish" version "0.35.0"
}

group = "com.smartdevicelink"
version = file("../../VERSION").text.trim()

mavenPublishing {
publishToMavenCentral()
signAllPublications()
}

android {
compileSdkVersion 34
compileSdkVersion 36
defaultConfig {
minSdkVersion 16
targetSdkVersion 34
versionCode 26
minSdkVersion 21
targetSdkVersion 36
versionCode 27
versionName new File(projectDir.path, ('/../../VERSION')).text.trim()
buildConfigField "String", "VERSION_NAME", '\"' + versionName + '\"'
resValue "string", "SDL_LIB_VERSION", '\"' + versionName + '\"'
Expand Down Expand Up @@ -38,35 +58,39 @@ android {
main.java.srcDirs += '../../base/src/main/java'
androidTest.assets.srcDirs += '../../generator/rpc_spec/'
}

buildFeatures {
aidl true
}

namespace 'com.smartdevicelink'
testNamespace 'com.smartdevicelink.test'
}

ext { VERSION_NAME = "$project.android.defaultConfig.versionName" }

dependencies {
api fileTree(dir: 'libs', include: ['*.jar'])
//api 'com.livio.taskmaster:taskmaster:0.6.0'
api 'com.smartdevicelink:bson_java_port:1.2.5'
api 'com.smartdevicelink:bson_java_port:1.2.6'
api 'androidx.lifecycle:lifecycle-extensions:2.2.0'
api 'androidx.annotation:annotation:1.1.0'
annotationProcessor 'androidx.lifecycle:lifecycle-compiler:2.2.0'
api 'androidx.annotation:annotation:1.9.1'
annotationProcessor 'androidx.lifecycle:lifecycle-compiler:2.9.4'

testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:5.7.0'
androidTestImplementation 'org.mockito:mockito-core:5.7.0'
androidTestImplementation 'org.mockito:mockito-android:5.7.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.5.1'
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.mockito:mockito-core:5.20.0'
androidTestImplementation 'androidx.test:rules:1.7.0'
androidTestImplementation 'org.mockito:mockito-core:5.20.0'
androidTestImplementation 'org.mockito:mockito-android:5.20.0'
androidTestImplementation 'androidx.test.ext:junit:1.3.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.7.0'
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.7.0'
}

buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.13.0'
afterEvaluate {
tasks.named("sourceReleaseJar") {
exclude { details ->
details.file.toPath().toString().contains("/generated/")
}
}
}

apply plugin: "com.vanniktech.maven.publish"
}
9 changes: 0 additions & 9 deletions android/sdl_android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,6 @@ POM_LICENCE_NAME=BSD 3-Clause
POM_LICENCE_URL=https://opensource.org/licenses/BSD-3-Clause
POM_LICENCE_DIST=repo

RELEASE_REPOSITORY_URL=https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/
SNAPSHOT_REPOSITORY_URL=https://s01.oss.sonatype.org/content/repositories/snapshots/

POM_DEVELOPER_ID=
POM_DEVELOPER_NAME=
POM_DEVELOPER_URL=

signing.keyId=
signing.password=
signing.secretKeyRingFile=
SONATYPE_NEXUS_USERNAME=
SONATYPE_NEXUS_PASSWORD=
28 changes: 25 additions & 3 deletions android/sdl_android/src/androidTest/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<manifest package="com.smartdevicelink.test"
xmlns:android="http://schemas.android.com/apk/res/android">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-sdk android:minSdkVersion="16" />
<uses-sdk android:minSdkVersion="21" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<!-- Required to pair Bluetooth devices -->
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
Expand All @@ -13,10 +12,33 @@
android:name="android.test.InstrumentationTestRunner"
android:targetPackage="com.smartdevicelink.test" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_CONNECTED_DEVICE" />

<queries>
<intent>
<action android:name="com.smartdevicelink.router.service" />
</intent>
<intent>
<action android:name="sdl.router.startservice" />
</intent>
</queries>

<application android:debuggable="true">
<uses-library android:name="android.test.runner" />
<activity android:name="com.smartdevicelink.managers.lockscreen.SDLLockScreenActivity" />
<receiver
android:name=".TestSdlReceiver"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="com.smartdevicelink.USB_ACCESSORY_ATTACHED" /> <!--For AOA -->
<action android:name="android.bluetooth.device.action.ACL_CONNECTED" />
<action android:name="sdl.router.startservice" />
</intent-filter>
</receiver>
</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.smartdevicelink;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

/**
* Added so we pass IntegrationValidator when running unit test.
*/
public class TestSdlReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
}
}
Loading
Loading