Skip to content

Commit ac2e17e

Browse files
committed
Re-export 'ndk' and 'ndk_sys' crates
Since we expose `ndk` types in the public API it makes sense to re-export these APIs so users of android-activity can defer to these without needing to manually sync the versions for explicit dependencies.
1 parent db3ea33 commit ac2e17e

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

android-activity/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1717
> - `SourceFlags::TRACKBALL` (from `Source::is_trackball_class()`) is named `SourceClass::NAVIGATION` in the `ndk`.
1818
1919
- rust-version bumped to 1.73.0 ([#193](https://github.com/rust-mobile/android-activity/pull/193))
20+
- The `ndk` and `ndk-sys` crates are now re-exported under `android_activity::ndk` and `android_activity::ndk_sys` ([#194](https://github.com/rust-mobile/android-activity/pull/194))
2021

2122
## [0.6.0] - 2024-04-26
2223

android-activity/src/lib.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,17 @@ use std::sync::Arc;
119119
use std::sync::RwLock;
120120
use std::time::Duration;
121121

122-
use input::KeyCharacterMap;
122+
use bitflags::bitflags;
123123
use libc::c_void;
124+
124125
use ndk::asset::AssetManager;
125126
use ndk::native_window::NativeWindow;
126127

127-
use bitflags::bitflags;
128+
// Since we expose `ndk` types in our public API it's convenient if crates can
129+
// defer to these re-exported APIs and avoid having to bump explicit
130+
// dependencies when they pull in new releases of android-activity.
131+
pub use ndk;
132+
pub use ndk_sys;
128133

129134
#[cfg(not(target_os = "android"))]
130135
compile_error!("android-activity only supports compiling for Android");
@@ -162,6 +167,7 @@ pub mod error;
162167
use error::Result;
163168

164169
pub mod input;
170+
use input::KeyCharacterMap;
165171

166172
mod config;
167173
pub use config::ConfigurationRef;

0 commit comments

Comments
 (0)