Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
org.benoitharrault.random
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
android
org.benoitharrault.random
Merge requests
!2
Resolve "Fix build application package"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "Fix build application package"
2-fix-build-application-package
into
master
Overview
0
Commits
1
Pipelines
3
Changes
2
Merged
Benoît Harrault
requested to merge
2-fix-build-application-package
into
master
4 years ago
Overview
0
Commits
1
Pipelines
3
Changes
2
Expand
Closes
#2 (closed)
Edited
4 years ago
by
Benoît Harrault
0
0
Merge request reports
Viewing commit
78e4ed54
Show latest version
2 files
+
34
−
12
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
78e4ed54
Fix build package
· 78e4ed54
Benoît Harrault
authored
4 years ago
android/app/build.gradle
+
32
−
12
Options
@@ -6,41 +6,61 @@ if (localPropertiesFile.exists()) {
}
}
def
gradleProperties
=
new
Properties
()
def
gradlePropertiesFile
=
rootProject
.
file
(
'gradle.properties'
)
if
(
gradlePropertiesFile
.
exists
())
{
gradlePropertiesFile
.
withReader
(
'UTF-8'
)
{
reader
->
gradleProperties
.
load
(
reader
)
}
}
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
flutter
VersionCode
=
local
Properties
.
getProperty
(
'
flutter
.versionCode'
)
if
(
flutter
VersionCode
==
null
)
{
flutter
VersionCode
=
'1'
def
app
VersionCode
=
gradle
Properties
.
getProperty
(
'
app
.versionCode'
)
if
(
app
VersionCode
==
null
)
{
app
VersionCode
=
'1'
}
def
flutter
VersionName
=
local
Properties
.
getProperty
(
'
flutter
.versionName'
)
if
(
flutter
VersionName
==
null
)
{
flutter
VersionName
=
'1.0'
def
app
VersionName
=
gradle
Properties
.
getProperty
(
'
app
.versionName'
)
if
(
app
VersionName
==
null
)
{
app
VersionName
=
'1.0'
}
apply
plugin:
'com.android.application'
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
def
keystoreProperties
=
new
Properties
()
def
keystorePropertiesFile
=
rootProject
.
file
(
'key.properties'
)
if
(
keystorePropertiesFile
.
exists
())
{
keystoreProperties
.
load
(
new
FileInputStream
(
keystorePropertiesFile
))
}
android
{
compileSdkVersion
30
defaultConfig
{
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId
"org.benoitharrault.random"
minSdkVersion
16
targetSdkVersion
30
versionCode
flutterVersionCode
.
toInteger
()
versionName
flutterVersionName
versionCode
appVersionCode
.
toInteger
()
versionName
appVersionName
archivesBaseName
=
"$applicationId"
+
"_"
+
"$versionCode"
}
signingConfigs
{
release
{
keyAlias
keystoreProperties
[
'keyAlias'
]
keyPassword
keystoreProperties
[
'keyPassword'
]
storeFile
keystoreProperties
[
'storeFile'
]
?
file
(
keystoreProperties
[
'storeFile'
])
:
null
storePassword
keystoreProperties
[
'storePassword'
]
}
}
buildTypes
{
release
{
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig
signingConfigs
.
debug
signingConfig
signingConfigs
.
release
}
}
}
Loading