-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE] Build the manifest-bundle.zip for applications and libraries
This commit enables the manifest-bundle.zip creation for applications and libraries by default in the regular ui5 build. The manifest-bundle.zip contains the manifest.json files of the application and libary such as the ones for the nested components. In addition, the manifest bundler checks for linked i18n resources in the manifest.json from sap.app/i18n and includes those i18n resources into the manifest-bundle.zip as well. The tests have been enhanced to validate the existence of the manifest-bundle.zip and also special checks for the content of the bundle. Fixes: https://github.com/SAP/ui5-builder/issues/144
- Loading branch information
1 parent
dd653c8
commit f53aeea
Showing
26 changed files
with
396 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
test/expected/build/application.b/dest/manifest-bundle/embedded/i18n/i18n.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
title=embedded-i18n |
1 change: 1 addition & 0 deletions
1
test/expected/build/application.b/dest/manifest-bundle/embedded/i18n/i18n_de.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
title=embedded-i18n_de |
13 changes: 13 additions & 0 deletions
13
test/expected/build/application.b/dest/manifest-bundle/embedded/manifest.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"_version": "1.1.0", | ||
"sap.app": { | ||
"_version": "1.1.0", | ||
"id": "id1.embedded", | ||
"type": "component", | ||
"applicationVersion": { | ||
"version": "1.2.2" | ||
}, | ||
"embeddedBy": "../", | ||
"title": "{{title}}" | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
test/expected/build/application.b/dest/manifest-bundle/i18n/i18n.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
title=app-i18n |
1 change: 1 addition & 0 deletions
1
test/expected/build/application.b/dest/manifest-bundle/i18n/i18n_de.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
title=app-i18n_de |
13 changes: 13 additions & 0 deletions
13
test/expected/build/application.b/dest/manifest-bundle/manifest.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"_version": "1.1.0", | ||
"sap.app": { | ||
"_version": "1.1.0", | ||
"id": "id1", | ||
"type": "application", | ||
"applicationVersion": { | ||
"version": "1.2.2" | ||
}, | ||
"embeds": ["embedded"], | ||
"title": "{{title}}" | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
test/expected/build/library.k/dest/resources/library/k/.library
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<library xmlns="http://www.sap.com/sap.ui.library.xsd" > | ||
|
||
<name>library.k</name> | ||
<vendor>SAP SE</vendor> | ||
<copyright>Some fancy copyright</copyright> | ||
<version>1.0.0</version> | ||
|
||
<title>{{title}}</title> | ||
<documentation>{{description}}</documentation> | ||
|
||
<dependencies> | ||
<dependency> | ||
<libraryName>sap.ui.core</libraryName> | ||
</dependency> | ||
</dependencies> | ||
|
||
<appData> | ||
<manifest xmlns="http://www.sap.com/ui5/buildext/manifest"> | ||
<i18n>messagebundle.properties</i18n> | ||
<offline>false</offline> | ||
<deviceTypes desktop="true" phone="true" tablet="true" /> | ||
<supportedTheme>sap_belize</supportedTheme> | ||
<supportedTheme>sap_belize_plus</supportedTheme> | ||
<supportedTheme>sap_belize_hcw</supportedTheme> | ||
<supportedTheme>sap_belize_hcb</supportedTheme> | ||
<contentDensities cozy="true" compact="false" /> | ||
</manifest> | ||
<ownership xmlns="http://www.sap.com/ui5/buildext/ownership"> | ||
<component>NOT-ME</component> | ||
</ownership> | ||
</appData> | ||
|
||
</library> |
30 changes: 30 additions & 0 deletions
30
test/expected/build/library.k/dest/resources/library/k/library.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/*! | ||
* Some fancy copyright | ||
*/ | ||
sap.ui.define([ | ||
'sap/ui/core/Core', | ||
], function(Core) { | ||
|
||
"use strict"; | ||
|
||
sap.ui.getCore().initLibrary({ | ||
name : "library.k", | ||
version: "1.0.0", | ||
dependencies : ["sap.ui.core"], | ||
types: [ | ||
"library.k.AnyType" | ||
], | ||
interfaces: [ | ||
"library.k.IAny" | ||
], | ||
controls: [ | ||
"library.k.AnyControl" | ||
], | ||
elements: [ | ||
"library.k.AnyElement" | ||
], | ||
}); | ||
|
||
return thisLib; | ||
|
||
}); |
42 changes: 42 additions & 0 deletions
42
test/expected/build/library.k/dest/resources/library/k/manifest-bundle/manifest.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"_version": "1.9.0", | ||
"sap.app": { | ||
"id": "library.k", | ||
"type": "library", | ||
"embeds": [], | ||
"applicationVersion": { | ||
"version": "1.0.0" | ||
}, | ||
"title": "{{title}}", | ||
"description": "{{description}}", | ||
"resources": "resources.json", | ||
"offline": true | ||
}, | ||
"sap.ui": { | ||
"technology": "UI5", | ||
"supportedThemes": [] | ||
}, | ||
"sap.ui5": { | ||
"dependencies": { | ||
"minUI5Version": "1.0", | ||
"libs": {} | ||
}, | ||
"library": { | ||
"i18n": "messagebundle.properties", | ||
"content": { | ||
"controls": [ | ||
"library.k.AnyControl" | ||
], | ||
"elements": [ | ||
"library.k.AnyElement" | ||
], | ||
"types": [ | ||
"library.k.AnyType" | ||
], | ||
"interfaces": [ | ||
"library.k.IAny" | ||
] | ||
} | ||
} | ||
} | ||
} |
57 changes: 57 additions & 0 deletions
57
test/expected/build/library.k/dest/resources/library/k/manifest.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{ | ||
"_version": "1.9.0", | ||
"sap.app": { | ||
"id": "library.k", | ||
"type": "library", | ||
"embeds": [], | ||
"i18n": "messagebundle.properties", | ||
"applicationVersion": { | ||
"version": "1.0.0" | ||
}, | ||
"title": "{{title}}", | ||
"description": "{{description}}", | ||
"ach": "NOT-ME", | ||
"resources": "resources.json", | ||
"offline": false | ||
}, | ||
"sap.ui": { | ||
"technology": "UI5", | ||
"deviceTypes": { | ||
"desktop": true, | ||
"tablet": true, | ||
"phone": true | ||
}, | ||
"supportedThemes": [] | ||
}, | ||
"sap.ui5": { | ||
"dependencies": { | ||
"minUI5Version": "1.0", | ||
"libs": { | ||
"sap.ui.core": { | ||
"minVersion": "1.0.0" | ||
} | ||
} | ||
}, | ||
"contentDensities": { | ||
"cozy": true, | ||
"compact": false | ||
}, | ||
"library": { | ||
"i18n": true, | ||
"content": { | ||
"controls": [ | ||
"library.k.AnyControl" | ||
], | ||
"elements": [ | ||
"library.k.AnyElement" | ||
], | ||
"types": [ | ||
"library.k.AnyType" | ||
], | ||
"interfaces": [ | ||
"library.k.IAny" | ||
] | ||
} | ||
} | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
test/expected/build/library.k/dest/resources/library/k/messagebundle.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
title=a title | ||
description=a description |
2 changes: 2 additions & 0 deletions
2
test/expected/build/library.k/dest/resources/library/k/messagebundle_de.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
title=a title | ||
description=a description |
2 changes: 2 additions & 0 deletions
2
test/expected/build/library.k/dest/resources/library/k/messagebundle_en.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
title=a title | ||
description=a description |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"name": "library.j", | ||
"version": "1.0.0", | ||
"description": "Simple SAPUI5 based library for testing JSDoc builds", | ||
"dependencies": {}, | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<library xmlns="http://www.sap.com/sap.ui.library.xsd" > | ||
|
||
<name>library.k</name> | ||
<vendor>SAP SE</vendor> | ||
<copyright>Some fancy copyright</copyright> | ||
<version>1.0.0</version> | ||
|
||
<title>{{title}}</title> | ||
<documentation>{{description}}</documentation> | ||
|
||
</library> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/*! | ||
* Some fancy copyright | ||
*/ | ||
sap.ui.define([ | ||
'sap/ui/core/Core', | ||
], function(Core) { | ||
|
||
"use strict"; | ||
|
||
sap.ui.getCore().initLibrary({ | ||
name : "library.k", | ||
version: "1.0.0", | ||
dependencies : [], | ||
types: [ | ||
"library.k.AnyType" | ||
], | ||
interfaces: [ | ||
"library.k.IAny" | ||
], | ||
controls: [ | ||
"library.k.AnyControl" | ||
], | ||
elements: [ | ||
"library.k.AnyElement" | ||
], | ||
}); | ||
|
||
return thisLib; | ||
|
||
}); |
Oops, something went wrong.