Skip to content

Commit

Permalink
Update to Android 12
Browse files Browse the repository at this point in the history
  • Loading branch information
tonisives committed Jan 3, 2023
1 parent 780759b commit a2a97f1
Show file tree
Hide file tree
Showing 12 changed files with 38 additions and 26 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Changelog

## [2.0.7]
- Fix Android 12 `exported` build error.
- Move the build to latest Kotlin, Gradle and Java versions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# HMKit Android

The HMKit Android SDK makes it easy to work with car data using the HIGH MOBILITY API platform. The SDK implements a strong security layer between your Android app and the platform while providing a straightforward native interface to read from, and write to, connected cars.
In addition, the SDK provides a UI component used to initate OAuth2 for the end-user in order to retrieve consent for the sharing of data.
In addition, the SDK provides a UI component used to initiate OAuth2 for the end-user in order to retrieve consent for the sharing of data.

# Table of contents

Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
buildscript {
ext.kotlinVersion = '1.4.10'
ext.kotlinVersion = '1.7.20'

repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.6.0'
classpath 'com.android.tools.build:gradle:7.3.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
}
}
Expand All @@ -28,7 +28,7 @@ ext.ver = [
"hmkit-core-jni" : "1.0.2",
"hmkit-crypto" : "1.4.6",
"hmkit-utils" : "1.4.5",
"hmkit-android" : "2.0.6",
"hmkit-android" : "2.0.7",
"hmkit-auto-api" : "13.1.1",
"command-queue" : "1.1.1",
compileSdk : 28
Expand Down
5 changes: 5 additions & 0 deletions gradle/DEPLOYING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
steps in https://raw.githubusercontent.com/tonisives/tools/master/gradle/deploy-java-mavenCentral.gradle (versions in all files)


./gradlew clean :hmkit-android:build
g :hmkit-android:publishReleasePublicationToMavenCentralRepository
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
31 changes: 17 additions & 14 deletions hmkit-android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@ version ver."${deploy.id}"

android {
compileSdkVersion ver.compileSdk
namespace 'com.highmobility.hmkit'

defaultConfig {
minSdkVersion 21
targetSdkVersion ver.compileSdk
versionCode 1
versionName "${version}"
multiDexEnabled true

ndk {
Expand All @@ -30,14 +29,15 @@ android {

buildTypes {
release {
buildConfigField("String", "VERSION_NAME", "\"${version}\"")
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
buildConfigField("String", "VERSION_NAME", "\"${version}\"")
}
}

lintOptions {
abortOnError false
}

testOptions {
unitTests {
Expand All @@ -55,10 +55,13 @@ android {
}

sourceSets.main {
jni.srcDirs = [] // This prevents the auto generation of Android.mk
// This prevents the auto generation of Android.mk
jniLibs.srcDir 'src/main/libs'
// This is not necessary unless you have precompiled libraries in your project.
}
lint {
abortOnError false
}
}

dependencies {
Expand All @@ -79,13 +82,13 @@ dependencies {
implementation 'androidx.legacy:legacy-support-v4:1.0.0'

// its not easy to use ndk with junit(should build separate binary)
testImplementation 'junit:junit:4.12'
testImplementation 'org.robolectric:robolectric:4.4'
testImplementation 'androidx.test:core:1.1.0'
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.robolectric:robolectric:4.9.2'
testImplementation 'androidx.test:core:1.5.0'

androidTestImplementation 'androidx.test.ext:junit:1.1.0'
androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'
androidTestImplementation 'androidx.test:rules:1.1.0-alpha4'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4'
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.1.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.4'
androidTestImplementation 'androidx.test:runner:1.5.1'
androidTestImplementation 'androidx.test:rules:1.5.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0'
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.5.0'
}
3 changes: 1 addition & 2 deletions hmkit-android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.highmobility.hmkit">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.BLUETOOTH"/>
Expand Down
2 changes: 1 addition & 1 deletion hmkit-core-jni
2 changes: 1 addition & 1 deletion hmkit-crypto
2 changes: 1 addition & 1 deletion hmkit-utils

0 comments on commit a2a97f1

Please sign in to comment.