This repository was archived by the owner on Jul 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 115
Cargo apk build system rework and other enhancements #223
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
8d671ed
Rework for #212.
philip-alldredge 611c140
Updated readme with build target instructions.
philip-alldredge 83c6bf5
Cleans up examples.
philip-alldredge a072232
Fixed incorrect path in README
philip-alldredge 8e56c20
Formatting fix
philip-alldredge ccb19e4
Fixes unable to find static library when crate names have a hyphen.
philip-alldredge d4c77d6
Documentation improvements. Avoid inheriting package_name and label.
philip-alldredge 49e2aad
Formatting fix.
philip-alldredge b071485
Fixed example
philip-alldredge e0d01b1
Fix incorrect config
philip-alldredge af780bd
Fix to readme.
philip-alldredge 7de68cc
Fix to example and readme.
philip-alldredge File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
---|---|---|
@@ -1 +1,3 @@ | ||
target/ | ||
.idea | ||
*.iml |
This file contains hidden or 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 |
---|---|---|
@@ -1,8 +1,43 @@ | ||
FROM tomaka/rust-android | ||
FROM rust:latest | ||
|
||
RUN apt-get update | ||
RUN apt-get install -yq openjdk-8-jre unzip wget | ||
|
||
RUN rustup target add armv7-linux-androideabi | ||
RUN rustup target add aarch64-linux-android | ||
RUN rustup target add i686-linux-android | ||
RUN rustup target add x86_64-linux-android | ||
|
||
# Install Android SDK | ||
ENV ANDROID_HOME /opt/android-sdk-linux | ||
RUN mkdir ${ANDROID_HOME} && \ | ||
cd ${ANDROID_HOME} && \ | ||
wget -q https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip && \ | ||
unzip -q sdk-tools-linux-4333796.zip && \ | ||
rm sdk-tools-linux-4333796.zip && \ | ||
chown -R root:root /opt | ||
RUN yes | ${ANDROID_HOME}/tools/bin/sdkmanager "platform-tools" | ||
RUN yes | ${ANDROID_HOME}/tools/bin/sdkmanager "platforms;android-29" | ||
RUN yes | ${ANDROID_HOME}/tools/bin/sdkmanager "build-tools;29.0.0" | ||
RUN ${ANDROID_HOME}/tools/bin/sdkmanager --update | ||
|
||
# Install Android NDK | ||
RUN cd /usr/local && \ | ||
wget -q http://dl.google.com/android/repository/android-ndk-r20-linux-x86_64.zip && \ | ||
unzip -q android-ndk-r20-linux-x86_64.zip && \ | ||
rm android-ndk-r20-linux-x86_64.zip | ||
ENV NDK_HOME /usr/local/android-ndk-r20 | ||
|
||
# Copy contents to container. Should only use this on a clean directory | ||
COPY . /root/cargo-apk | ||
|
||
# Run tests | ||
RUN cd /root/cargo-apk/cargo-apk && cargo test --release | ||
|
||
# Install Binary and remove source and build files | ||
RUN cargo install --path /root/cargo-apk/cargo-apk | ||
RUN rm -rf /root/cargo-apk | ||
|
||
# Make directory for user code | ||
RUN mkdir /root/src | ||
WORKDIR /root/src |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.