Skip to content

Commit

Permalink
imp: upgrade gradle, fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
juliansteenbakker committed Aug 15, 2023
1 parent 4387d82 commit 86b7ca3
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ jobs:
- name: Install dependencies
run: flutter pub get
- name: Format
run: flutter format -n --set-exit-if-changed .
run: dart format --set-exit-if-changed .
- name: Linter
run: flutter analyze
12 changes: 8 additions & 4 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

android {
compileSdkVersion 33
compileSdk 33

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
Expand All @@ -38,12 +38,16 @@ android {
multiDexEnabled true
}

kotlinOptions {
jvmTarget = '11'
}

compileOptions {
// Flag to enable support for the new language APIs
coreLibraryDesugaringEnabled true
// Sets Java compatibility to Java 8
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
// Sets Java compatibility to Java 11
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
if (project.android.hasProperty('namespace')) {
namespace 'net.touchcapture.qr.flutterqr'
Expand Down
5 changes: 5 additions & 0 deletions android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
3 changes: 2 additions & 1 deletion example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 33
compileSdk 33

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
Expand All @@ -48,6 +48,7 @@ android {
signingConfig signingConfigs.debug
}
}
namespace 'net.touchcapture.qr.flutterqrexample'
}

flutter {
Expand Down
3 changes: 1 addition & 2 deletions example/android/app/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="net.touchcapture.qr.flutterqrexample">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<!-- The INTERNET permission is required for development. Specifically,
flutter needs it to communicate with the running application
Expand Down
2 changes: 1 addition & 1 deletion example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
tasks.register('clean', Delete) {
delete rootProject.buildDir
}
5 changes: 4 additions & 1 deletion example/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true
android.enableJetifier=true
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
6 changes: 3 additions & 3 deletions example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed Dec 07 09:14:33 CET 2022
#Tue Aug 08 21:31:11 CEST 2023
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit 86b7ca3

Please sign in to comment.