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 119
Cargo apk build system rework and other enhancements #223
Merged
Merged
Changes from 1 commit
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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
|---|---|---|
|
|
@@ -3,6 +3,7 @@ name = "advanced" | |
| version = "0.1.0" | ||
| authors = ["Philip Alldredge <[email protected]"] | ||
| publish = false | ||
| edition = "2018" | ||
|
|
||
| [package.metadata.android] | ||
| # The target Android API level. | ||
|
|
@@ -60,6 +61,11 @@ opengles_version_minor = 2 | |
| "android:screenOrientation" = "unspecified" | ||
| "android:uiOptions" = "none" | ||
|
|
||
| # Adds a uses-feature element to the manifest | ||
| # Supported keys: name, required, version | ||
| # The glEsVersion attribute is not supported using this section. | ||
| # It can be specified using the opengles_version_major and opengles_version_minor values | ||
| # See https://developer.android.com/guide/topics/manifest/uses-feature-element | ||
| [[package.metadata.android.feature]] | ||
| name = "android.hardware.camera" | ||
|
|
||
|
|
@@ -68,14 +74,13 @@ name = "android.hardware.vulkan.level" | |
| version = "1" | ||
| required = false | ||
|
|
||
| # Request permissions. Note that android_version 23 and higher, Android requires the application | ||
| # to request permissions at runtime. There is currently no way to do this using a pure NDK based application. | ||
| # Adds a uses-permission element to the manifest. | ||
| # Note that android_version 23 and higher, Android requires the application to request permissions at runtime. | ||
| # There is currently no way to do this using a pure NDK based application. | ||
| # See https://developer.android.com/guide/topics/manifest/uses-permission-element | ||
| [[package.metadata.android.permission]] | ||
| name = "android.permission.WRITE_EXTERNAL_STORAGE" | ||
| maxSdkVersion = "18" | ||
|
|
||
| [[package.metadata.android.permission]] | ||
| name = "android.permission.CAMERA" | ||
|
|
||
| [dependencies.android_glue] | ||
| path = "../../glue" | ||
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,6 +1,3 @@ | ||
| extern crate android_glue; | ||
|
|
||
| fn main() { | ||
| android_glue::write_log("main() has been called from advanced example"); | ||
| loop {} | ||
| println!("main() has been called from advanced example"); | ||
| } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
|---|---|---|
|
|
@@ -2,6 +2,7 @@ | |
| name = "android_glue_example" | ||
| version = "0.1.0" | ||
| authors = ["Pierre Krieger <[email protected]>"] | ||
| edition = "2018" | ||
|
|
||
| [package.metadata.android] | ||
| label = "Basic android-rs-glue example" | ||
|
|
||
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,6 +1,3 @@ | ||
| extern crate android_glue; | ||
|
|
||
| fn main() { | ||
| android_glue::write_log("main() has been called"); | ||
| loop {} | ||
| } |
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 |
|---|---|---|
|
|
@@ -3,6 +3,7 @@ name = "android_primary_bin" | |
| version = "0.1.0" | ||
| authors = ["Philip Alldredge <[email protected]>"] | ||
| publish = false | ||
| edition = "2018" | ||
|
|
||
| [dependencies.android_glue] | ||
| path = "../../glue" | ||
|
|
||
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,5 +1,3 @@ | ||
| fn main() { | ||
| #[cfg(target_os = "android")] | ||
| android_glue::write_log("main() has been called on example1"); | ||
| loop {} | ||
| println!("main() has been called on example1"); | ||
| } |
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,5 +1,3 @@ | ||
| fn main() { | ||
| #[cfg(target_os = "android")] | ||
| android_glue::write_log("main() has been called on the secondary binary"); | ||
| loop {} | ||
| println!("main() has been called on the secondary binary"); | ||
| } |
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,5 +1,3 @@ | ||
| fn main() { | ||
| #[cfg(target_os = "android")] | ||
| android_glue::write_log("main() has been called on the primary binary"); | ||
| loop {} | ||
| println!("main() has been called on the primary binary"); | ||
| } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,11 +1,12 @@ | ||
| [package] | ||
| name = "android_glue_assets_example" | ||
| version = "0.1.0" | ||
| authors = ["Pierre Krieger <[email protected]>"] | ||
|
|
||
| [package.metadata.android] | ||
| label = "Using assets android-rs-glue example" | ||
| assets = "assets" | ||
|
|
||
| [dependencies.android_glue] | ||
| path = "../../glue" | ||
| [package] | ||
| name = "android_glue_assets_example" | ||
| version = "0.1.0" | ||
| authors = ["Pierre Krieger <[email protected]>"] | ||
| edition = "2018" | ||
|
|
||
| [package.metadata.android] | ||
| label = "Using assets android-rs-glue example" | ||
| assets = "assets" | ||
|
|
||
| [dependencies.android_glue] | ||
| path = "../../glue" |
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,5 +1,3 @@ | ||
| extern crate android_glue; | ||
|
|
||
| mod fs; | ||
|
|
||
| use std::io::BufRead; | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
|---|---|---|
|
|
@@ -2,6 +2,7 @@ | |
| name = "android_glue_icon_example" | ||
| version = "0.1.0" | ||
| authors = ["Pierre Krieger <[email protected]>"] | ||
| edition = "2018" | ||
|
|
||
| [package.metadata.android] | ||
| label = "Using icon android-rs-glue example" | ||
|
|
||
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,6 +1,3 @@ | ||
| extern crate android_glue; | ||
|
|
||
| fn main() { | ||
| android_glue::write_log("main() has been called, did you like the icon?"); | ||
| loop {} | ||
| } |
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.