diff --git a/.gitignore b/.gitignore index ddbc0d1..6784ebe 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,5 @@ gradle-app.setting poeditor-gradle.iml example-project/App/ example-project/gradle.properties + +gradle.properties diff --git a/README.md b/README.md index 8ca2a1e..4d669c1 100644 --- a/README.md +++ b/README.md @@ -31,3 +31,25 @@ Sync terms: ``` gradle poeditorSyncTerms ``` + +Configuration +============= + +Example configuration: + +```groovy +poeditor { + apikey 'apikey here' + + projects { + androidApp { + projectId 'project id here' + type 'android_strings' + terms 'App/src/main/res/values/strings.xml' + trans 'en', 'App/src/main/res/values/strings.xml' + trans 'nl', 'App/src/main/res/values-nl/strings.xml' + trans 'fr', 'App/src/main/res/values-fr/strings.xml' + } + } +} +``` diff --git a/build.gradle b/build.gradle index 1e9f900..3372a7e 100644 --- a/build.gradle +++ b/build.gradle @@ -1,12 +1,17 @@ apply plugin: 'java' apply plugin: 'groovy' +apply plugin: 'signing' apply plugin: 'maven' apply plugin: 'maven-publish' +// Artifact settings group = 'be.lukin.poeditor' version='0.1.0' archivesBaseName = 'gradle' +def _name = 'Gradle Plugin for POEditor' +def _description = 'Gradle plugin to sync translations with POEditor' + repositories { mavenLocal() mavenCentral() @@ -39,8 +44,59 @@ publishing { uploadArchives { repositories { + /* + mavenDeployer { + + } + */ mavenDeployer { + beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } + repository(url: uri('./build/repo')) + + /* + repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { + authentication(userName: ossrhUsername, password: ossrhPassword) + } + + snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") { + authentication(userName: ossrhUsername, password: ossrhPassword) + }*/ + + pom.project { + name _name + packaging 'jar' + artifactId archivesBaseName + description _description + url 'https://github.com/lukin0110/poeditor-gradle/' + inceptionYear '2015' + + scm { + url 'https://github.com/lukin0110/poeditor-gradle/' + connection 'scm:https://github.com/lukin0110/poeditor-gradle.git' + developerConnection 'scm:git://github.com/lukin0110/poeditor-gradle.git' + } + + licenses { + license { + name 'The Apache License, Version 2.0' + url 'http://www.apache.org/licenses/LICENSE-2.0.txt' + } + } + + developers { + developer { + id 'lukin0110' + name 'Maarten Huijsmans' + email 'maarten@lukin.be' + } + } + + issueManagement { + system 'GitHub issues' + url 'https://github.com/lukin0110/poeditor-gradle/issues' + } + } } } } diff --git a/docs/TODO.md b/docs/TODO.md index 55eec1d..e965d66 100644 --- a/docs/TODO.md +++ b/docs/TODO.md @@ -1,10 +1,8 @@ # Todo -- upload gradle plugin (open ticket etc) - Later: - proper exceptions for invalid params - splitup tasks in separate classes - add plugin to build process: https://github.com/crashlytics/gradle-plugin-example -- .travis.yml +- .travis.yml & unit testing - document gradle plugin: configuration