Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Ewout ter Hoeven
VLC-Android
Commits
305506db
Commit
305506db
authored
Jan 29, 2018
by
Geoffrey Métais
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix versioncode with AGP 3.0
parent
f57cc024
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
vlc-android/build.gradle
vlc-android/build.gradle
+9
-2
No files found.
vlc-android/build.gradle
View file @
305506db
...
...
@@ -154,8 +154,6 @@ android {
// make per-variant version code
applicationVariants
.
all
{
variant
->
// set the composite code
variant
.
mergedFlavor
.
versionCode
=
variant
.
productFlavors
.
get
(
0
).
versionCode
*
10000000
+
defaultConfig
.
versionCode
+
variant
.
productFlavors
.
get
(
1
).
versionCode
//Custom APK name
variant
.
outputs
.
all
{
output
->
...
...
@@ -164,6 +162,15 @@ android {
outputName
+=
variant
.
productFlavors
.
get
(
0
).
name
.
toUpperCase
()
+
"-"
outputName
+=
variant
.
versionName
+
"-"
+
variant
.
productFlavors
.
get
(
1
).
name
+
".apk"
outputFileName
=
outputName
output
.
processManifest
.
doLast
{
// set the composite code
def
generatedCode
=
variant
.
productFlavors
.
get
(
0
).
versionCode
*
10000000
+
defaultConfig
.
versionCode
+
variant
.
productFlavors
.
get
(
1
).
versionCode
String
manifestPath
=
"$manifestOutputDirectory/AndroidManifest.xml"
def
manifestContent
=
file
(
manifestPath
).
getText
()
manifestContent
=
manifestContent
.
replace
(
'android:versionCode="1"'
,
String
.
format
(
'android:versionCode="%s"'
,
generatedCode
))
file
(
manifestPath
).
write
(
manifestContent
)
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment