Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
mobile_scanner
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Navaron Bracke
2023-10-22 15:43:39 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
75c887501db8921ad3f7a60681feea971b870dc6
75c88750
1 parent
246b77e6
update example app Gradle settings
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
30 deletions
android/build.gradle
example/android/app/build.gradle
example/android/settings.gradle
android/build.gradle
View file @
75c8875
...
...
@@ -48,6 +48,18 @@ android {
defaultConfig
{
minSdkVersion
21
}
testOptions
{
unitTests
.
all
{
useJUnitPlatform
()
testLogging
{
events
"passed"
,
"skipped"
,
"failed"
,
"standardOut"
,
"standardError"
outputs
.
upToDateWhen
{
false
}
showStandardStreams
=
true
}
}
}
}
dependencies
{
...
...
@@ -69,15 +81,3 @@ dependencies {
testImplementation
'org.jetbrains.kotlin:kotlin-test'
testImplementation
'org.mockito:mockito-core:5.0.0'
}
testOptions
{
unitTests
.
all
{
useJUnitPlatform
()
testLogging
{
events
"passed"
,
"skipped"
,
"failed"
,
"standardOut"
,
"standardError"
outputs
.
upToDateWhen
{
false
}
showStandardStreams
=
true
}
}
}
...
...
example/android/app/build.gradle
View file @
75c8875
plugins
{
id
"com.android.application"
id
"kotlin-android"
id
"dev.flutter.flutter-gradle-plugin"
}
def
localProperties
=
new
Properties
()
def
localPropertiesFile
=
rootProject
.
file
(
'local.properties'
)
if
(
localPropertiesFile
.
exists
())
{
...
...
@@ -6,11 +12,6 @@ if (localPropertiesFile.exists()) {
}
}
def
flutterRoot
=
localProperties
.
getProperty
(
'flutter.sdk'
)
if
(
flutterRoot
==
null
)
{
throw
new
GradleException
(
"Flutter SDK not found. Define location with flutter.sdk in the local.properties file."
)
}
def
flutterVersionCode
=
localProperties
.
getProperty
(
'flutter.versionCode'
)
if
(
flutterVersionCode
==
null
)
{
flutterVersionCode
=
'1'
...
...
@@ -21,12 +22,10 @@ if (flutterVersionName == null) {
flutterVersionName
=
'1.0'
}
apply
plugin:
'com.android.application'
apply
plugin:
'kotlin-android'
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android
{
namespace
"dev.steenbakker.mobile_scanner_example"
compileSdkVersion
33
ndkVersion
flutter
.
ndkVersion
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
...
...
@@ -57,7 +56,6 @@ android {
signingConfig
signingConfigs
.
debug
}
}
namespace
'dev.steenbakker.mobile_scanner_example'
}
flutter
{
...
...
example/android/settings.gradle
View file @
75c8875
include
':app'
pluginManagement
{
def
flutterSdkPath
=
{
def
properties
=
new
Properties
()
file
(
"local.properties"
).
withInputStream
{
properties
.
load
(
it
)
}
def
flutterSdkPath
=
properties
.
getProperty
(
"flutter.sdk"
)
assert
flutterSdkPath
!=
null
,
"flutter.sdk not set in local.properties"
return
flutterSdkPath
}
settings
.
ext
.
flutterSdkPath
=
flutterSdkPath
()
def
localPropertiesFile
=
new
File
(
rootProject
.
projectDir
,
"local.properties"
)
def
properties
=
new
Properties
()
includeBuild
(
"${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle"
)
}
assert
localPropertiesFile
.
exists
()
localPropertiesFile
.
withReader
(
"UTF-8"
)
{
reader
->
properties
.
load
(
reader
)
}
include
":app"
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"
apply
from:
"${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle/app_plugin_loader.gradle"
...
...
Please
register
or
login
to post a comment