gradle-sync

Crates.iogradle-sync
lib.rsgradle-sync
version0.2.0
sourcesrc
created_at2018-09-02 18:30:47.692918
updated_at2018-09-08 13:50:53.62206
descriptionSmall utility to synchronize the gradle version with the cargo version.
homepage
repositoryhttps://github.com/lovebug356/gradle-sync
max_upload_size
id82654
size25,792
Thijs Vermeir (lovebug356)

documentation

README

Gradle-Sync

Build Status Build status codecov Latest version

Small utility to synchronize the gradle version with the cargo version.

Usage

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.

License

gradle-sync is licensed under either of

at your option.

Contribution

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.

Commit count: 23

cargo fmt