diff --git a/.gitignore b/.gitignore index 56f236872..462779feb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,12 @@ +# java +*.class + +# gradle .gradle build + +# intellij .idea -*.class \ No newline at end of file + +# mvn +target \ No newline at end of file diff --git a/README.md b/README.md index bf928b7ef..67e2df1ed 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,29 @@ To build the project, go to the `View` menu, then `Tool Windows > Gradle`. `buil To package a jar, use the `jar` Gradle task. +## Distributing the jar + +We use [OSSRH](http://central.sonatype.org/pages/ossrh-guide.html) to distribute this jar to a few public Maven and Gradle repositories. This process is [outlined here](http://central.sonatype.org/pages/apache-maven.html). + +While we use gradle as our default build tool for all ODK tools (including this one), we use maven for distributing the jar because OSSRH's gradle support is unreliable (e.g., snapshots don't always update). This means version and dependency changes must be made in both `build.gradle` and `pom.xml`. + +One deviation from OSSRH's documentation is that we use the latest versions of the maven plugins in `pom.xml`. Another deviation is that our `settings.xml` includes `gpg.homedir`, `gpg.keyname`, and `gpg.passphrase` so core committers can easily refer to the `opendatakit.gpg` folder. +``` + + + + + ... + + /path/to/opendatakit.gpg + the_keyname + the_passphrase + + + + +``` + ## Contributing code Any and all contributions to the project are welcome. ODK JavaRosa is used across the world primarily by organizations with a social purpose so you can have real impact! diff --git a/build.gradle b/build.gradle index f782e2bb3..ec525a22e 100644 --- a/build.gradle +++ b/build.gradle @@ -8,16 +8,20 @@ sourceSets.main.java.srcDirs = ['src'] sourceSets.test.java.srcDirs = ['test'] sourceSets.test.resources.srcDirs = ['resources'] +targetCompatibility = '1.7' +sourceCompatibility = '1.7' + dependencies { + // Be sure to update dependencies in pom.xml to match compileOnly group: 'net.sf.kxml', name: 'kxml2', version: '2.3.0' - testCompile group: 'junit', name: 'junit', version: '3.8.2' testCompile group: 'net.sf.kxml', name: 'kxml2', version: '2.3.0' } jar { - baseName = 'javarosa' - version = new Date().format('yyyy-MM-dd') + baseName = 'opendatakit-javarosa' + // Be sure to update version in pom.xml to match + version = '2.1.0-SNAPSHOT' archiveName = baseName + '-' + version + '.jar' manifest { diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index a3e9d71d4..d5f67ff8d 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 841c0028b..e6f184e0c 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Wed Feb 01 16:39:47 ICT 2017 +#Thu Mar 23 16:28:57 EDT 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-3.4.1-bin.zip diff --git a/pom.xml b/pom.xml new file mode 100644 index 000000000..d8583f9e9 --- /dev/null +++ b/pom.xml @@ -0,0 +1,118 @@ + + 4.0.0 + org.opendatakit + opendatakit-javarosa + + 2.1.0-SNAPSHOT + jar + opendatakit-javarosa + A Java library for rendering forms that are compliant with ODK XForms spec + https://github.com/opendatakit/javarosa + + + The Apache Software License, Version 2.0 + https://www.apache.org/licenses/LICENSE-2.0.txt + + + + + opendatakit + opendatakit.org@gmail.com + Open Data Kit + https://opendatakit.org + + + + scm:git:git://github.com/opendatakit/javarosa.git + scm:git:ssh://github.com:opendatakit/javarosa.git + https://github.com/opendatakit/javarosa/tree/master + + + + ossrh + https://oss.sonatype.org/content/repositories/snapshots + + + ossrh + https://oss.sonatype.org/service/local/staging/deploy/maven2/ + + + + UTF-8 + + + + + net.sf.kxml + kxml2 + 2.3.0 + compile + + + junit + junit + 3.8.2 + test + + + + src + test + + + org.apache.maven.plugins + maven-compiler-plugin + 3.6.1 + + + 1.7 + 1.7 + + + + org.apache.maven.plugins + maven-source-plugin + 3.0.1 + + + attach-sources + + jar-no-fork + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.10.4 + + + attach-javadocs + + jar + + + + -Xdoclint:none + + + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.6 + + + sign-artifacts + verify + + sign + + + + + + + \ No newline at end of file