5 releases
Uses old Rust 2015
0.2.0 | Sep 8, 2018 |
---|---|
0.1.4 | Sep 2, 2018 |
0.1.2 | Sep 2, 2018 |
0.1.1 | Sep 2, 2018 |
0.1.0 | Sep 2, 2018 |
#2224 in Development tools
44 downloads per month
25KB
629 lines
Gradle-Sync
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
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
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.
Dependencies
~2.3–3.5MB
~57K SLoC