mirror of
https://github.com/apache/cordova-android.git
synced 2026-01-30 00:05:28 +08:00
chore!: update template defaults (#1837)
* chore: update default package id * chore: sync cordova-app-hello-world defaults & modified for Android differences
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"GRADLE_PLUGIN_GOOGLE_SERVICES_VERSION": "4.4.2",
|
||||
"IS_GRADLE_PLUGIN_GOOGLE_SERVICES_ENABLED": false,
|
||||
"IS_GRADLE_PLUGIN_KOTLIN_ENABLED": false,
|
||||
"PACKAGE_NAMESPACE": "io.cordova.helloCordova",
|
||||
"PACKAGE_NAMESPACE": "org.apache.cordova.hellocordova",
|
||||
"JAVA_SOURCE_COMPATIBILITY": 11,
|
||||
"JAVA_TARGET_COMPATIBILITY": 11,
|
||||
"KOTLIN_JVM_TARGET": null
|
||||
|
||||
@@ -205,7 +205,7 @@ exports.create = function (project_path, config, options, events) {
|
||||
return Promise.reject(new CordovaError('Project already exists! Delete and recreate'));
|
||||
}
|
||||
|
||||
const package_name = config.android_packageName() || config.packageName() || 'io.cordova.helloCordova';
|
||||
const package_name = config.android_packageName() || config.packageName() || 'org.apache.cordova.hellocordova';
|
||||
const project_name = config.name() || 'Hello Cordova';
|
||||
|
||||
const safe_activity_name = config.android_activityName() || options.activityName || 'MainActivity';
|
||||
|
||||
@@ -155,10 +155,10 @@ describe('create', function () {
|
||||
});
|
||||
|
||||
describe('parameter values and defaults', function () {
|
||||
it('should have a default package name of io.cordova.helloCordova', () => {
|
||||
it('should have a default package name of org.apache.cordova.hellocordova', () => {
|
||||
config_mock.packageName.and.returnValue(undefined);
|
||||
return create.create(project_path, config_mock, {}, events_mock).then(() => {
|
||||
expect(create.validatePackageName).toHaveBeenCalledWith('io.cordova.helloCordova');
|
||||
expect(create.validatePackageName).toHaveBeenCalledWith('org.apache.cordova.hellocordova');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -17,9 +17,10 @@
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
<widget xmlns = "http://www.w3.org/ns/widgets"
|
||||
id = "io.cordova.helloCordova"
|
||||
version = "2.0.0">
|
||||
<widget xmlns="http://www.w3.org/ns/widgets"
|
||||
xmlns:cdv="http://cordova.apache.org/ns/1.0"
|
||||
id="org.apache.cordova.hellocordova"
|
||||
version="1.0.0">
|
||||
|
||||
<!-- Preferences for Android -->
|
||||
<preference name="loglevel" value="DEBUG" />
|
||||
|
||||
@@ -17,40 +17,37 @@
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
<widget xmlns = "http://www.w3.org/ns/widgets"
|
||||
id = "io.cordova.helloCordova"
|
||||
version = "2.0.0">
|
||||
<widget xmlns="http://www.w3.org/ns/widgets"
|
||||
xmlns:cdv="http://cordova.apache.org/ns/1.0"
|
||||
id="org.apache.cordova.hellocordova"
|
||||
version="1.0.0">
|
||||
<name>Hello Cordova</name>
|
||||
|
||||
<description>
|
||||
A sample Apache Cordova application that responds to the deviceready event.
|
||||
</description>
|
||||
|
||||
<author href="http://cordova.io" email="dev@cordova.apache.org">
|
||||
<author email="dev@cordova.apache.org" href="https://cordova.apache.org">
|
||||
Apache Cordova Team
|
||||
</author>
|
||||
|
||||
<!-- <content src="http://mysite.com/myapp.html" /> for external pages -->
|
||||
<!-- https://s.apache.org/cdv-content-config -->
|
||||
<content src="index.html" />
|
||||
|
||||
<!-- Allow List docs: https://cordova.apache.org/docs/en/latest/ -->
|
||||
<access origin="*" />
|
||||
<!-- Grant certain URLs the ability to launch external applications. This
|
||||
behaviour is set to match that of Cordova versions before 3.6.0, and
|
||||
should be reviewed before launching an application in production. It
|
||||
may be changed in the future. -->
|
||||
<!-- To allow connections to other resources, you must explicitly permit them using `access` tags. -->
|
||||
<!-- https://s.apache.org/cdv-network-request-access -->
|
||||
<!-- Example:
|
||||
<access origin="https://cordova.apache.org" />
|
||||
-->
|
||||
|
||||
<!-- To control which URLs the WebView itself can be navigated to, use the `allow-navigation` tags. -->
|
||||
<!-- https://s.apache.org/cdv-allow-navigation -->
|
||||
<!-- Example:
|
||||
<allow-navigation href="https://cordova.apache.org/*" />
|
||||
-->
|
||||
|
||||
<!-- To control which URLs the app is allowed to ask the system to open, use the `allow-intent` tags. -->
|
||||
<!-- https://s.apache.org/cdv-allow-intent -->
|
||||
<allow-intent href="http://*/*" />
|
||||
<allow-intent href="https://*/*" />
|
||||
<allow-intent href="tel:*" />
|
||||
<allow-intent href="sms:*" />
|
||||
<allow-intent href="mailto:*" />
|
||||
<allow-intent href="geo:*" />
|
||||
<allow-intent href="market:*" />
|
||||
|
||||
<preference name="loglevel" value="DEBUG" />
|
||||
<!--
|
||||
<preference name="loadUrlTimeoutValue" value="20000" />
|
||||
<preference name="InAppBrowserStorageEnabled" value="true" />
|
||||
<preference name="disallowOverscroll" value="true" />
|
||||
-->
|
||||
</widget>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
<widget id="io.cordova.helloCordova" version="2.0.0" xmlns="http://www.w3.org/ns/widgets">
|
||||
<widget id="org.apache.cordova.hellocordova" version="2.0.0" xmlns="http://www.w3.org/ns/widgets">
|
||||
<name>Hello Cordova</name>
|
||||
<description>
|
||||
A sample Apache Cordova application that responds to the deviceready event.
|
||||
|
||||
Reference in New Issue
Block a user