Skip to content

Commit

Permalink
try some kotlindoc stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
sanity committed Mar 23, 2017
1 parent 63784d8 commit f9f6a65
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Shoebox can be added easily to your Maven or Gradle project through Jitpack:

### Usage Example
```kotlin
fun main(args : Array<String>) {
fun usersGender(args : Array<String>) {
val dir = Files.createTempDirectory("sb-")
val userStore = Shoebox<User>(dir.resolve("users"))
val usersByEmail = View(Shoebox(dir.resolve("usersByEmail")), userStore, viewBy = User::email)
Expand Down
4 changes: 3 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
5 changes: 5 additions & 0 deletions packages.md
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -8,7 +8,11 @@ import java.nio.file.Files
* Created by ian on 3/9/17.
*/

fun main(args : Array<String>) {
fun main(args: Array<String>) {
usersGender()
}

fun usersGender() {
val dir = Files.createTempDirectory("sb-")
val userStore = Shoebox<User>(dir.resolve("users"))
val usersByEmail = View(Shoebox(dir.resolve("usersByEmail")), userStore, viewBy = User::email)
Expand Down

0 comments on commit f9f6a65

Please sign in to comment.