BuildStendhalForAndroid: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
imported>AntumDeluge →Gradle: update instructions for changes to source |
imported>AntumDeluge →Building from Command Line: re-organize to make ant preferred build method |
||
| (3 intermediate revisions by the same user not shown) | |||
| Line 33: | Line 33: | ||
'''''IMPORTANT:''' Before you can build from the command line/terminal, you must have a [[VisualGuideToBuildingStendhalStep1|Java compiler]] provided by a [https://www.oracle.com/java/technologies/downloads/ Java Development Kit (JDK)] installed.'' |
'''''IMPORTANT:''' Before you can build from the command line/terminal, you must have a [[VisualGuideToBuildingStendhalStep1|Java compiler]] provided by a [https://www.oracle.com/java/technologies/downloads/ Java Development Kit (JDK)] installed.'' |
||
| ⚫ | |||
<span style="color:blue;">''Recommended''</span> |
|||
| ⚫ | As with other instructions on building from the command line, the Android client can also be built with an [https://ant.apache.org/ Apache Ant target]. The Ant target is a wrapper that calls the [[BuildStendhalForAndroid#Gradle|Gradle]] script and passes parameters to it. The same conditions related to invoking the Gradle scripts directly apply to using ant. |
||
'''''See also: [[BuildStendhalForAndroid#Signing_Packages|section on signing packages]]''''' |
|||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
Alternatively, an argument line can be passed to Gradle using the <span style="color:green;">gradle.params</span> property: |
|||
| ⚫ | |||
$ ant android -Dgradle.params="assembleRelease assembleDebug" |
|||
| ⚫ | |||
=== Gradle === |
=== Gradle === |
||
| Line 87: | Line 130: | ||
keyAlias=<key-alias> |
keyAlias=<key-alias> |
||
</pre> |
</pre> |
||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
=== Setting Revision Suffix === |
|||
The compiled .apk packages will be versioned with the date of build. A custom revision suffix can be added by setting the <span style="color:darkgreen;">android.rev</span> property. If invoking gradle script directly, use the '''''-P''''' switch. If calling ant, use the '''''-D''''' switch. |
|||
Example usage: |
|||
| ⚫ | |||
# calling gradle script directly |
|||
$ ./gradlew assembleDebug -Pandroid.rev=1 |
|||
# calling ant target |
|||
$ ant android -Dandroid.rev=1 |
|||
| ⚫ | |||
Example output: ''stendhal-webview-{{#time:Ymd}}-1-debug.apk'' |
|||