Skip to content

Commit

Permalink
Merge pull request #321 from juliuscanute/gradle-update
Browse files Browse the repository at this point in the history
imp: updated gradle dependencies
  • Loading branch information
juliansteenbakker authored May 31, 2021
2 parents d936a93 + 7422f73 commit 568a289
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 35 deletions.
21 changes: 8 additions & 13 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,31 @@ group 'net.touchcapture.qr.flutterqr'
version '1.0-SNAPSHOT'

buildscript {
ext.kotlin_version = '1.4.30'
ext.kotlin_version = '1.5.10'
repositories {
google()
jcenter()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:4.1.2'
classpath 'com.android.tools.build:gradle:4.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

rootProject.allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'

android {
compileSdkVersion 30


sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
Expand All @@ -38,17 +35,15 @@ android {
minSdkVersion 20
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
lintOptions {
disable 'InvalidPackage'
buildFeatures {
viewBinding = true
}

aaptOptions.cruncherEnabled = false
aaptOptions.useNewCruncher = false

}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation('com.journeyapps:zxing-android-embedded:4.1.0') { transitive = false }
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'com.google.zxing:core:3.3.0'
}
4 changes: 0 additions & 4 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ android {
main.java.srcDirs += 'src/main/kotlin'
}

lintOptions {
disable 'InvalidPackage'
}

defaultConfig {
applicationId "net.touchcapture.qr.flutterqrexample"
// minSdkVersion is determined by Native View.
Expand Down
10 changes: 4 additions & 6 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
buildscript {
ext.kotlin_version = '1.4.30'
ext.kotlin_version = '1.5.10'
repositories {
google()
jcenter()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:4.1.2'
classpath 'com.android.tools.build:gradle:4.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}

Expand Down
2 changes: 1 addition & 1 deletion example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
18 changes: 7 additions & 11 deletions example/android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
include ':app'

def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties()

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

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

0 comments on commit 568a289

Please sign in to comment.