Skip to content

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

Notifications You must be signed in to change notification settings

lovebug356/gradle-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages