Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(app): Update the android in flutter to latest gradle and other dependencies #785

Closed
wants to merge 1 commit into from
Closed
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
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ jobs:
uses: flutter-actions/setup-flutter@v2
with:
channel: stable
version: 3.10.6
version: 3.19.5
- name: Install flutter app dependencies
run: make install-flutter-dependencies
- name: Run iOS Simulator
Expand Down Expand Up @@ -288,7 +288,7 @@ jobs:
uses: flutter-actions/setup-flutter@v2
with:
channel: stable
version: 3.10.6
version: 3.19.5
- name: Install flutter app dependencies
run: make install-flutter-dependencies
- name: Build APK in Debug mode
Expand Down
12 changes: 7 additions & 5 deletions demo/app/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 34
ndkVersion flutter.ndkVersion
compileSdkVersion 35
ndkVersion "25.1.8937393"

compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
Expand All @@ -56,11 +57,10 @@ android {
applicationId "dev.trustbloc.wallet"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
minSdkVersion 22
targetSdkVersion flutter.targetSdkVersion
minSdkVersion 24
targetSdkVersion 35
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

Expand All @@ -77,6 +77,7 @@ android {
it.buildConfigField 'String', 'INITIATE_ISSUANCE_URLS_AUTH_CODE_FLOW', '"' + INITIATE_ISSUANCE_URLS_AUTH_CODE_FLOW + '"'
}
}
namespace 'dev.trustbloc.wallet'
}

flutter {
Expand All @@ -100,4 +101,5 @@ dependencies {
androidTestImplementation "androidx.test:runner:1.2.0"
androidTestUtil "androidx.test:orchestrator:1.4.2"
implementation 'com.squareup.okhttp3:okhttp:4.9.0'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.2.0'
}
14 changes: 13 additions & 1 deletion demo/app/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:7.1.2'
classpath 'com.android.tools.build:gradle:7.4.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
if (walletSdkPkgUsr != null) {
classpath "dev.trustbloc:vc-wallet-sdk:$walletSdkPkgVer"
Expand All @@ -44,6 +44,7 @@ buildscript {
allprojects {
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')

if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
Expand Down Expand Up @@ -77,6 +78,17 @@ rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
afterEvaluate { project ->
if (project.hasProperty('android')) {
project.android {
if (namespace == null) {
namespace project.group
}
}
}
}
}
subprojects {
project.evaluationDependsOn(':app')
}
Expand Down
5 changes: 4 additions & 1 deletion demo/app/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@
;
; SPDX-License-Identifier: Apache-2.0

org.gradle.jvmargs=-Xmx1536M
org.gradle.jvmargs=-Xmx4608m
android.useAndroidX=true
android.enableJetifier=true
INITIATE_ISSUANCE_URL=
INITIATE_VERIFICATION_URL=
INITIATE_ISSUANCE_URLS_AUTH_CODE_FLOW=
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
2 changes: 1 addition & 1 deletion demo/app/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
Loading
Loading