BuildStendhalForAndroid: Difference between revisions

Jump to navigation Jump to search
Content deleted Content added
imported>AntumDeluge
imported>AntumDeluge
Gradle: changes to instructions
Line 50: Line 50:
</pre>
</pre>


'''NOTE:''' On Windows, if you used Android Studio to download the SDK, it will be located in <span style="color:green;">C:\\Users\\<username>\\AppData\\Local\\Android\\Sdk</span>.
'''''NOTE:''' On Windows, if you used Android Studio to download the SDK, it will be located in <span style="color:green;">C:\\Users\\<username>\\AppData\\Local\\Android\\Sdk</span>.''


From a command line or terminal, move into the <span style="color:green;">android</span> sub-directory & execute the following.
There are three build types available: <span style="color:darkgreen;">assembleRelease</span>, <span style="color:darkgreen;">assemblePrerelease</span>, & <span style="color:darkgreen;">assembleDebug</span>. From a command line or terminal, move into the <span style="color:green;">android</span> sub-directory & execute the following.


Unix/Linux example:
Unix/Linux example:
<pre>
<pre>
# with env variable set or sdk.dir set in local.properties
# with env variable set or sdk.dir set in local.properties
$ ./gradlew build
$ ./gradlew assembleRelease


# manually setting env variable
# manually setting env variable
$ ANDROID_SDK_ROOT="/path/to/sdk/root" ./gradlew build
$ ANDROID_SDK_ROOT="/path/to/sdk/root" ./gradlew assembleRelease
</pre>
</pre>


Line 66: Line 66:
<pre>
<pre>
# with env variable set or sdk.dir set in local.properties
# with env variable set or sdk.dir set in local.properties
> gradlew build
> gradlew assembleRelease


# manually setting env variable (do not use quotes)
# manually setting env variable (do not use quotes)
> set ANDROID_SDK_ROOT=C:\\path\\to\\sdk\\root
> set ANDROID_SDK_ROOT=C:\\path\\to\\sdk\\root
> gradlew build
> gradlew assembleRelease
</pre>
</pre>

If <span style="color:darkgreen;">build</span> is used as the argument (<code>gradlew build</code>), it will execute all build types.

'''''NOTE:''' For <span style="color:darkgreen;">assemblePrerelease</span> & <span style="color:darkgreen;">assembleDebug</span> to succeed, you must have the Android debugging keystore installed in your home directory. <span style="color:darkgreen;">assembleRelease</span> does not sign the .apk package. It will [https://developer.android.com/studio/publish/app-signing need to be signed] to work on most Android systems.''


After build completes, the resulting .apk packages will be located in <span style="color:green;"><source root>/build/build_android_client/outputs/apk</span>.
After build completes, the resulting .apk packages will be located in <span style="color:green;"><source root>/build/build_android_client/outputs/apk</span>.