mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-31 17:32:51 +08:00
Fix for build: version needs to be included in .jar and .js generated files.
This commit is contained in:
parent
b07072c12b
commit
99002f9dce
@ -5,7 +5,7 @@
|
|||||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||||
<title>PhoneGap</title>
|
<title>PhoneGap</title>
|
||||||
<link rel="stylesheet" href="master.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
<link rel="stylesheet" href="master.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||||
<script type="text/javascript" charset="utf-8" src="phonegap.js"></script>
|
<script type="text/javascript" charset="utf-8" src="phonegap.0.9.4.min.js"></script>
|
||||||
<script type="text/javascript" charset="utf-8" src="main.js"></script>
|
<script type="text/javascript" charset="utf-8" src="main.js"></script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
@ -82,11 +82,12 @@ class Classic
|
|||||||
|
|
||||||
# copies stuff from src directory into the android project directory (@path)
|
# copies stuff from src directory into the android project directory (@path)
|
||||||
def copy_libs
|
def copy_libs
|
||||||
|
version = IO.read(File.join(@framework_dir, '../VERSION'))
|
||||||
framework_res_dir = File.join(@framework_dir, "res")
|
framework_res_dir = File.join(@framework_dir, "res")
|
||||||
app_res_dir = File.join(@path, "res")
|
app_res_dir = File.join(@path, "res")
|
||||||
# copies in the jar
|
# copies in the jar
|
||||||
FileUtils.mkdir_p File.join(@path, "libs")
|
FileUtils.mkdir_p File.join(@path, "libs")
|
||||||
FileUtils.cp File.join(@framework_dir, "phonegap.jar"), File.join(@path, "libs")
|
FileUtils.cp File.join(@framework_dir, "phonegap.#{ version }.jar"), File.join(@path, "libs")
|
||||||
# copies in the strings.xml
|
# copies in the strings.xml
|
||||||
FileUtils.mkdir_p File.join(app_res_dir, "values")
|
FileUtils.mkdir_p File.join(app_res_dir, "values")
|
||||||
FileUtils.cp File.join(framework_res_dir, "values","strings.xml"), File.join(app_res_dir, "values", "strings.xml")
|
FileUtils.cp File.join(framework_res_dir, "values","strings.xml"), File.join(app_res_dir, "values", "strings.xml")
|
||||||
@ -110,7 +111,7 @@ class Classic
|
|||||||
phonegapjs << IO.read(File.join(js_dir, script))
|
phonegapjs << IO.read(File.join(js_dir, script))
|
||||||
phonegapjs << "\n\n"
|
phonegapjs << "\n\n"
|
||||||
end
|
end
|
||||||
File.open(File.join(@path, "assets", "www", @app_js_dir, "phonegap.js"), 'w') {|f| f.write(phonegapjs) }
|
File.open(File.join(@path, "assets", "www", @app_js_dir, "phonegap.#{ version }.js"), 'w') {|f| f.write(phonegapjs) }
|
||||||
end
|
end
|
||||||
|
|
||||||
# puts app name in strings
|
# puts app name in strings
|
||||||
|
Loading…
Reference in New Issue
Block a user