Crates.io | gradle-sync |
lib.rs | gradle-sync |
version | 0.2.0 |
source | src |
created_at | 2018-09-02 18:30:47.692918 |
updated_at | 2018-09-08 13:50:53.62206 |
description | Small utility to synchronize the gradle version with the cargo version. |
homepage | |
repository | https://github.com/lovebug356/gradle-sync |
max_upload_size | |
id | 82654 |
size | 25,792 |
Small utility to synchronize the gradle version with the cargo version.
First, add build dependency in Cargo.toml
:
[build-dependencies]
gradle-sync = "0.2.0"
and secondly, add the following code snippet to build.rs
(with a reference to the build.gradle
file):
extern crate gradle_sync;
use gradle_sync::BuildGradleFile;
use gradle_sync::GradlePropertiesFile;
fn main() {
BuildGradleFile::new("./app/build.gradle").unwrap()
.sync_with_cargo().unwrap();
GradlePropertiesFile::new("./gradle.properties").unwrap()
.sync_with_cargo().unwrap();
}
When you now build your project, the version specified in Cargo.toml
file is used as versionName
in the build.gradle
file. If required, the versionCode
is also incremented.
gradle-sync is licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in gradle-sync by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.