Skip to content

Commit

Permalink
Update java and ios as well as react native versions (#34)
Browse files Browse the repository at this point in the history
* feat: bump java to 17 on

* feat: bump versions

* feat: update to match android versions

* feat: patch package

* feat: bump min ios version

* feat: update pods

* feat: update lefthook
  • Loading branch information
JNdhlovu committed Apr 15, 2024
1 parent 91acbfd commit 08720ee
Show file tree
Hide file tree
Showing 22 changed files with 45,924 additions and 4,615 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -720,3 +720,5 @@ lib/

smile_config.json
*.keystore

*.xcode.env.local
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Release Notes

## 10.0.2

* Bump iOS to 10.0.9 (https://github.com/smileidentity/ios/releases/tag/v10.0.9)
* Bump minimum ios version to 13.4 (https://reactnative.dev/blog/2023/12/06/0.73-debugging-improvements-stable-symlinks#other-breaking-changes)
* Update java version to 17 on all instances
* Update react native to 0.73.6
* Update kotlin to version 1.9.23

## 10.0.1

* Bump Android to 10.0.4 (https://github.com/smileidentity/android/releases/tag/v10.0.4)
Expand Down
12 changes: 6 additions & 6 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ buildscript {
// Buildscript is evaluated before everything else so we can't use getExtOrDefault
def kotlin_version = rootProject.ext.has("kotlinVersion") ? rootProject.ext.get("kotlinVersion") : project.properties["SmileId_kotlinVersion"]
def smile_id_sdk_version = rootProject.ext.has("androidVersion") ? rootProject.ext.get("androidVersion") : project.properties["SmileId_androidVersion"]
project.logger.debug('Japhet Ndhlovu - SmileId - build.gradle - kotlin_version: ' + kotlin_version)

repositories {
google()
Expand All @@ -12,10 +13,9 @@ buildscript {
}

dependencies {
classpath "com.android.tools.build:gradle:8.1.2"
// noinspection DifferentKotlinGradleVersion
classpath "com.android.tools.build:gradle:8.3.1"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jlleitschuh.gradle:ktlint-gradle:11.6.0"
classpath "org.jlleitschuh.gradle:ktlint-gradle:12.1.0"
}
}

Expand Down Expand Up @@ -83,15 +83,15 @@ android {
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
jvmTarget = JavaVersion.VERSION_17.toString()
}

lintOptions {
disable "GradleCompatible"
}

composeOptions {
kotlinCompilerExtensionVersion '1.5.3'
kotlinCompilerExtensionVersion '1.5.11'
}

compileOptions {
Expand Down Expand Up @@ -130,7 +130,7 @@ dependencies {
implementation "com.smileidentity:android-sdk:$smile_id_sdk_version"
implementation "com.jakewharton.timber:timber"
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation("androidx.navigation:navigation-compose:2.7.4")
implementation("androidx.navigation:navigation-compose:2.7.7")
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
Expand Down
2 changes: 1 addition & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SmileId_kotlinVersion=1.9.10
SmileId_kotlinVersion=1.9.23
SmileId_minSdkVersion=21
SmileId_targetSdkVersion=34
SmileId_compileSdkVersion=34
Expand Down
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
presets: ['module:@react-native/babel-preset'],
};
8 changes: 4 additions & 4 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@ android {
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
jvmTarget = JavaVersion.VERSION_17.toString()
}
packagingOptions {
resources {
Expand All @@ -113,7 +113,7 @@ android {
dependencies {
// The version of react-native is set by the React Native Gradle Plugin
implementation("com.facebook.react:react-android")

implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
exclude group: 'com.squareup.okhttp3', module: 'okhttp'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,15 @@ class MainApplication : Application(), ReactApplication {
get() = BuildConfig.IS_HERMES_ENABLED
}

override fun getReactNativeHost(): ReactNativeHost {
return mReactNativeHost
}
override val reactNativeHost: ReactNativeHost
get() = mReactNativeHost

override fun onCreate() {
override fun onCreate() {
super.onCreate()
SoLoader.init(this, /* native exopackage */false)
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
// If you opted-in for the New Architecture, we load the native entry point for this app.
load()
}
ReactNativeFlipper.initializeFlipper(this, reactNativeHost.reactInstanceManager)
}
}
11 changes: 6 additions & 5 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ buildscript {
minSdkVersion = 21
compileSdkVersion = 34
targetSdkVersion = 34
kotlinVersion = "1.9.10"
kotlinVersion = "1.9.23"
kotlin_version = "1.9.23"

// We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
ndkVersion = "23.1.7779620"
Expand All @@ -17,9 +18,9 @@ buildscript {
gradlePluginPortal()
}
dependencies {
classpath "com.android.tools.build:gradle:8.1.2"
classpath("com.facebook.react:react-native-gradle-plugin")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
classpath "org.jlleitschuh.gradle:ktlint-gradle:11.6.0"
classpath "com.facebook.react:react-native-gradle-plugin"
classpath "com.android.tools.build:gradle:8.3.1"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.23"
classpath "org.jlleitschuh.gradle:ktlint-gradle:12.1.0"
}
}
2 changes: 1 addition & 1 deletion example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion example/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const path = require('path');
const pak = require('../package.json');

module.exports = {
presets: ['module:metro-react-native-babel-preset'],
presets: ['module:@react-native/babel-preset'],
plugins: [
[
'module-resolver',
Expand Down
10 changes: 1 addition & 9 deletions example/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ require Pod::Executable.execute_command('node', ['-p',
{paths: [process.argv[1]]},
)', __dir__]).strip

platform :ios, 13.0
platform :ios, 13.4
prepare_react_native_project!

# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
Expand All @@ -28,16 +28,9 @@ end
target 'SmileIdExample' do
config = use_native_modules!

# Flags change depending on the env values.
flags = get_default_flags()

use_react_native!(
:path => config[:reactNativePath],
# Hermes is now enabled by default. Disable by setting this flag to false.
:hermes_enabled => flags[:hermes_enabled],
:fabric_enabled => flags[:fabric_enabled],
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
:flipper_configuration => flipper_config,
Expand All @@ -57,6 +50,5 @@ target 'SmileIdExample' do
config[:reactNativePath],
:mac_catalyst_enabled => false
)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
end
end

0 comments on commit 08720ee

Please sign in to comment.