nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
parser: remove generated old-style accesors.
[nit.git]
/
src
/
android_annotations.nit
diff --git
a/src/android_annotations.nit
b/src/android_annotations.nit
index
f456f96
..
0ae0078
100644
(file)
--- a/
src/android_annotations.nit
+++ b/
src/android_annotations.nit
@@
-35,6
+35,9
@@
class AndroidProject
# Version of the Android application and APK
var version: nullable String = null
# Version of the Android application and APK
var version: nullable String = null
+ # Numerical version code of the Android application and APK
+ var version_code: Int = 0
+
# Custom lines to add to the AndroidManifest.xml in the <manifest> node
var manifest_lines = new Array[String]
# Custom lines to add to the AndroidManifest.xml in the <manifest> node
var manifest_lines = new Array[String]
@@
-68,6
+71,11
@@
redef class ModelBuilder
annots = collect_annotations_on_modules("android_manifest_application", mmodule)
for an in annots do project.manifest_application_lines.add an.arg_as_string(self)
annots = collect_annotations_on_modules("android_manifest_application", mmodule)
for an in annots do project.manifest_application_lines.add an.arg_as_string(self)
+ # Get the date and time (down to the minute) as string
+ var local_time = new Tm.localtime
+ var local_time_s = local_time.strftime("%y%m%d%H%M")
+ project.version_code = local_time_s.to_i
+
toolcontext.check_errors
return project
toolcontext.check_errors
return project