<NME> README.md
<BEF> joda-time-android
=================

This library is a version of [Joda-Time](https://github.com/JodaOrg/joda-time) built with Android in mind.

Usage
=====

Currently, the only way to use it is to import it into your project as a library.  Coming soon: aar support.

You will need to initialize the timezone provider (via `ResourceZoneInfoProvider.init()`) before you can start using this library.  I suggest putting this code in `Application.onCreate()`:

    ResourceZoneInfoProvider.init(this);

Why Joda-Time?
==============

Android has built-in date and time handling - why bother with a library?  If you've worked with Java's Date and Calendar classes you can probably answer this question yourself, but if not, check out [Joda-Time's list of benefits](http://www.joda.org/joda-time/#Why_Joda-Time).

For Android developers in particular Joda-Time solves one critical problem: stale timezone data.  Built-in timezone data is only updated when the OS is updated, and we all know how often that happens.  [Countries modify their timezones all the time](http://www.bbc.co.uk/news/world-europe-15512177); being able to update your own data keeps your app up-to-date and accurate.

Why This Library?
=================

I know what you are thinking: Joda-Time is a great library and it's just a single JAR, so why make things more complex by wrapping it in an Android library?

There is a particular problem with the JAR setup on Android: due to its usage of [ClassLoader.getResourceAsStream()](http://developer.android.com/reference/java/lang/ClassLoader.html#getResourceAsStream%28java.lang.String%29), it greatly inflates its memory footprint on apps.  (For more details, see [this blog post](http://daniel-codes.blogspot.com/2013/08/joda-times-memory-issue-in-android.html).)  This library avoids the problem for Android by loading from resources instead of a JAR.

```kotlin
AppInitializer.getInstance(this).initializeComponent(JodaTimeInitializer::class.java)
```

Troubleshooting
===============
__Q: My build fails with an error about a duplicate file__

> Duplicate files copied in APK META-INF/LICENSE.txt

or

> Duplicate files copied in APK META-INF/NOTICE.txt

__A: We can safely exclude those files from our build. You need to specify these two `exclude`s in your `build.gradle` file and you will be good to go:__

```
android {
    ...
    packagingOptions {
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
    }
}
```

or 

__B: We can safely choose to add those files to our build. You need to specify these two `merge`s in your `build.gradle` file and you will be good to go:__

```
android {
    ...
    packagingOptions {
        merge '**/LICENSE.txt'
        merge '**/NOTICE.txt'
    }
}
```

<MSG> Updated README

- Moved Usage to bottom

- Added Maven Central dependency info

<DFF> @@ -3,25 +3,47 @@ joda-time-android
 
 This library is a version of [Joda-Time](https://github.com/JodaOrg/joda-time) built with Android in mind.
 
-Usage
-=====
-
-Currently, the only way to use it is to import it into your project as a library.  Coming soon: aar support.
-
-You will need to initialize the timezone provider (via `ResourceZoneInfoProvider.init()`) before you can start using this library.  I suggest putting this code in `Application.onCreate()`:
-
-    ResourceZoneInfoProvider.init(this);
-
 Why Joda-Time?
 ==============
 
 Android has built-in date and time handling - why bother with a library?  If you've worked with Java's Date and Calendar classes you can probably answer this question yourself, but if not, check out [Joda-Time's list of benefits](http://www.joda.org/joda-time/#Why_Joda-Time).
 
-For Android developers in particular Joda-Time solves one critical problem: stale timezone data.  Built-in timezone data is only updated when the OS is updated, and we all know how often that happens.  [Countries modify their timezones all the time](http://www.bbc.co.uk/news/world-europe-15512177); being able to update your own data keeps your app up-to-date and accurate.
+For Android developers Joda-Time solves one critical problem: stale timezone data.  Built-in timezone data is only updated when the OS is updated, and we all know how often that happens.  [Countries modify their timezones all the time](http://www.bbc.co.uk/news/world-europe-15512177); being able to update your own tz data keeps your app up-to-date and accurate.
 
 Why This Library?
 =================
 
 I know what you are thinking: Joda-Time is a great library and it's just a single JAR, so why make things more complex by wrapping it in an Android library?
 
-There is a particular problem with the JAR setup on Android: due to its usage of [ClassLoader.getResourceAsStream()](http://developer.android.com/reference/java/lang/ClassLoader.html#getResourceAsStream%28java.lang.String%29), it greatly inflates its memory footprint on apps.  (For more details, see [this blog post](http://daniel-codes.blogspot.com/2013/08/joda-times-memory-issue-in-android.html).)  This library avoids the problem for Android by loading from resources instead of a JAR.
\ No newline at end of file
+There is a particular problem with the JAR setup on Android: due to its usage of [ClassLoader.getResourceAsStream()](http://developer.android.com/reference/java/lang/ClassLoader.html#getResourceAsStream%28java.lang.String%29), it greatly inflates its memory footprint on apps.  (For more details, see [this blog post](http://daniel-codes.blogspot.com/2013/08/joda-times-memory-issue-in-android.html).)  This library avoids the problem for Android by loading from resources instead of a JAR.
+
+Usage
+=====
+
+You can either import this project as a plain old library project, or you can use it as an AAR from Maven Central.
+
+If you're using maven:
+
+    <dependency>
+      <groupId>net.danlew</groupId>
+      <artifactId>android.joda</artifactId>
+      <version>2.3</version>
+      <type>aar</type>
+    </dependency>
+
+If you're using gradle:
+
+    dependencies {
+      compile 'net.danlew:android.joda:2.3@aar'
+    }
+
+Once the project is imported, you **must** initialize the timezone provider with a `Context` (via `ResourceZoneInfoProvider.init()`) before you can start using this library.  I suggest putting this code in `Application.onCreate()`:
+
+    public class MyApp extends Application {
+        @Override
+        public void onCreate() {
+            super.onCreate();
+          
+            ResourceZoneInfoProvider.init(this);
+        }
+    }
\ No newline at end of file

Updated README