Skip to content

The core library that many of the ODK tools are built around. It's written in Java, implements the ODK XForms spec, and runs on mobile devices and cloud servers. ✨🏗✨

License

Notifications You must be signed in to change notification settings

getodk/javarosa

Repository files navigation

ODK JavaRosa

Platform License Build status Slack status

JavaRosa is a Java library for rendering forms that are compliant with ODK XForms spec. It is at the heart of many of the ODK tools. ODK JavaRosa is a fork of JavaRosa 1.0 that has been modified to NOT run on J2ME devices. The key differences are:

  • Regularly updated to ensure spec compliance
  • KoBo additional instance defn. and filter paths
  • remember all bind attributes and any additional attributes on <input>, <select>, <group>, etc. statements
  • numerous enhancements and contributions from SurveyCTO and others.
  • J2ME sub-projects removed

ODK JavaRosa is part of Open Data Kit (ODK), a free and open-source set of tools which help organizations author, field, and manage mobile data collection solutions. Learn more about the Open Data Kit project and its history here and read about example ODK deployments here.

Setting up your development environment

  1. Fork the javarosa project (why and how to fork)

  2. Clone your fork of the project locally. At the command line:

     git clone https://github.com/YOUR-GITHUB-USERNAME/javarosa
    

We recommend using IntelliJ IDEA for development. On the welcome screen, click Import Project, navigate to your javarosa folder, and select the build.gradle file. Use the defaults through the wizard. Once the project is imported, IntelliJ may ask you to update your remote maven repositories. Follow the instructions to do so.

Building the project

To build the project, go to the View menu, then Tool Windows > Gradle. build will be in odk-javarosa > Tasks > build > build. Double-click build to package the application. This Gradle task will now be the default action in your Run menu.

To package a jar, use the jar Gradle task.

Distributing the jar

We use OSSRH to distribute this jar to a few public Maven and Gradle repositories. This process is outlined here.

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.

<!-- ${user.home}/.m2/settings.xml -->
<settings>
	<profiles>
		<profile>
		    ...
			<properties>
				<gpg.homedir>/path/to/opendatakit.gpg</gpg.homedir>
				<gpg.keyname>the_keyname</gpg.keyname>
				<gpg.passphrase>the_passphrase</gpg.passphrase>
			</properties>
		</profile>
	</profiles>
</settings>

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!

If you're ready to contribute code, see the contribution guide.

Downloading builds

Per-commit debug builds can be found on CircleCI. Login with your GitHub account, click the build you'd like, then find the JAR in the Artifacts tab under $CIRCLE_ARTIFACTS.

About

The core library that many of the ODK tools are built around. It's written in Java, implements the ODK XForms spec, and runs on mobile devices and cloud servers. ✨🏗✨

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages