diff --git a/README.md b/README.md index 90a5726..2521b72 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ Shoebox can be added easily to your Maven or Gradle project through Jitpack: ### Usage Example ```kotlin -fun main(args : Array) { +fun usersGender(args : Array) { val dir = Files.createTempDirectory("sb-") val userStore = Shoebox(dir.resolve("users")) val usersByEmail = View(Shoebox(dir.resolve("usersByEmail")), userStore, viewBy = User::email) diff --git a/build.gradle b/build.gradle index 999ef19..4390c7e 100644 --- a/build.gradle +++ b/build.gradle @@ -61,7 +61,9 @@ dependencies { task dokkaJavadoc(type: org.jetbrains.dokka.gradle.DokkaTask) { outputFormat = 'html' outputDirectory = javadoc.destinationDir - inputs.dir 'src/main/kotlin' + inputs.dir 'src/usersGender/kotlin' + samples = ['com/github/sanity/shoebox/samples'] + includes = ['packages.md'] } task javadocJar(type: Jar, dependsOn: dokkaJavadoc) { diff --git a/packages.md b/packages.md new file mode 100644 index 0000000..14a93e1 --- /dev/null +++ b/packages.md @@ -0,0 +1,5 @@ +# Module shoebox + +ShoeBox is a [Kotlin](http://kotlinlang.org/) library for object persistence that supports the +[observer pattern](https://en.wikipedia.org/wiki/Observer_pattern) so your code can be notified immediately when +stored data is changed. \ No newline at end of file diff --git a/src/main/kotlin/com/github/sanity/shoebox/demos/one/one.kt b/src/main/kotlin/com/github/sanity/shoebox/samples/usersGender.kt similarity index 92% rename from src/main/kotlin/com/github/sanity/shoebox/demos/one/one.kt rename to src/main/kotlin/com/github/sanity/shoebox/samples/usersGender.kt index 4166494..fa33698 100644 --- a/src/main/kotlin/com/github/sanity/shoebox/demos/one/one.kt +++ b/src/main/kotlin/com/github/sanity/shoebox/samples/usersGender.kt @@ -1,4 +1,4 @@ -package com.github.sanity.shoebox.demos.one +package com.github.sanity.shoebox.samples import com.github.sanity.shoebox.Shoebox import com.github.sanity.shoebox.View @@ -8,7 +8,11 @@ import java.nio.file.Files * Created by ian on 3/9/17. */ -fun main(args : Array) { +fun main(args: Array) { + usersGender() +} + +fun usersGender() { val dir = Files.createTempDirectory("sb-") val userStore = Shoebox(dir.resolve("users")) val usersByEmail = View(Shoebox(dir.resolve("usersByEmail")), userStore, viewBy = User::email)