Skip to content

Commit 7422f73

Browse files
imp: updated gradle dependencies
1 parent 514fce7 commit 7422f73

5 files changed

Lines changed: 20 additions & 35 deletions

File tree

android/build.gradle

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,31 @@ group 'net.touchcapture.qr.flutterqr'
22
version '1.0-SNAPSHOT'
33

44
buildscript {
5-
ext.kotlin_version = '1.4.30'
5+
ext.kotlin_version = '1.5.10'
66
repositories {
77
google()
8-
jcenter()
8+
mavenCentral()
99
}
1010

1111
dependencies {
12-
classpath 'com.android.tools.build:gradle:4.1.2'
12+
classpath 'com.android.tools.build:gradle:4.2.1'
1313
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1414
}
1515
}
1616

1717
rootProject.allprojects {
1818
repositories {
1919
google()
20-
jcenter()
20+
mavenCentral()
2121
}
2222
}
2323

2424
apply plugin: 'com.android.library'
2525
apply plugin: 'kotlin-android'
26-
apply plugin: 'kotlin-android-extensions'
27-
apply plugin: 'kotlin-kapt'
2826

2927
android {
3028
compileSdkVersion 30
3129

32-
3330
sourceSets {
3431
main.java.srcDirs += 'src/main/kotlin'
3532
}
@@ -38,17 +35,15 @@ android {
3835
minSdkVersion 20
3936
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
4037
}
41-
lintOptions {
42-
disable 'InvalidPackage'
38+
buildFeatures {
39+
viewBinding = true
4340
}
44-
45-
aaptOptions.cruncherEnabled = false
46-
aaptOptions.useNewCruncher = false
41+
4742
}
4843

4944
dependencies {
5045
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
5146
implementation('com.journeyapps:zxing-android-embedded:4.1.0') { transitive = false }
52-
implementation 'androidx.appcompat:appcompat:1.2.0'
47+
implementation 'androidx.appcompat:appcompat:1.3.0'
5348
implementation 'com.google.zxing:core:3.3.0'
5449
}

example/android/app/build.gradle

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ android {
3232
main.java.srcDirs += 'src/main/kotlin'
3333
}
3434

35-
lintOptions {
36-
disable 'InvalidPackage'
37-
}
38-
3935
defaultConfig {
4036
applicationId "net.touchcapture.qr.flutterqrexample"
4137
// minSdkVersion is determined by Native View.

example/android/build.gradle

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,26 @@
11
buildscript {
2-
ext.kotlin_version = '1.4.30'
2+
ext.kotlin_version = '1.5.10'
33
repositories {
44
google()
5-
jcenter()
5+
mavenCentral()
66
}
77

88
dependencies {
9-
classpath 'com.android.tools.build:gradle:4.1.2'
9+
classpath 'com.android.tools.build:gradle:4.2.1'
1010
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1111
}
1212
}
1313

1414
allprojects {
1515
repositories {
1616
google()
17-
jcenter()
17+
mavenCentral()
1818
}
1919
}
2020

2121
rootProject.buildDir = '../build'
2222
subprojects {
2323
project.buildDir = "${rootProject.buildDir}/${project.name}"
24-
}
25-
subprojects {
2624
project.evaluationDependsOn(':app')
2725
}
2826

example/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip

example/android/settings.gradle

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
include ':app'
22

3-
def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
3+
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4+
def properties = new Properties()
45

5-
def plugins = new Properties()
6-
def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
7-
if (pluginsFile.exists()) {
8-
pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
9-
}
6+
assert localPropertiesFile.exists()
7+
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
108

11-
plugins.each { name, path ->
12-
def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
13-
include ":$name"
14-
project(":$name").projectDir = pluginDirectory
15-
}
9+
def flutterSdkPath = properties.getProperty("flutter.sdk")
10+
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11+
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"

0 commit comments

Comments
 (0)