Skip to content

Commit

Permalink
updated generic readme
Browse files Browse the repository at this point in the history
  • Loading branch information
synapticloop committed Apr 13, 2017
1 parent 1bf3516 commit f8b9d10
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 1 deletion.
16 changes: 16 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ plugins {
id 'net.saliman.cobertura' version '2.2.6'
id 'co.riiid.gradle' version '0.4.2'

id "com.github.johnrengelman.shadow" version "1.2.4"

id "synapticloop.copyrightr" version "1.1.2"
id "synapticloop.documentr" version "2.9.0"
}
Expand All @@ -30,10 +32,21 @@ repositories {
jcenter()
}

configurations {
shadow
}

dependencies {
runtime 'synapticloop:routemaster:2.1.0'

compile 'synapticloop:routemaster:2.1.0'

shadow 'synapticloop:templar:1.4.4'
}

shadowJar {
classifier = ''
configurations = [project.configurations.shadow]
}

github {
Expand All @@ -42,9 +55,12 @@ github {
if(System.getenv('GITHUB_TOKEN')) {
token = System.getenv('GITHUB_TOKEN')
}

tagName = version
name = version
assets = [
'build/libs/' + archivesBaseName + '-' + version + '.jar',
]
}

build.finalizedBy(shadowJar)
6 changes: 6 additions & 0 deletions src/docs/readme-00.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
This is an example module that offers additional, modular support for [synapticloop routemaster](https://github.com/synapticloop/routemaster).

Routemaster modules can be automatically loaded from the `modules` directory that
can automatically provide:

- Handlers
- Configuration options
- RESTful routes
- static routes

# Creating a new module

Expand Down
11 changes: 11 additions & 0 deletions src/docs/readme-01.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@

## Including dependencies in the module

Within the `build.gradle` file a `shadow` configuration is defined. Any dependencies
that you wish to include in the final module **MUST** be listed here.

See the `configurations`, `dependencies` and the `shadowJat` sections in the
`build.gradle` file above.

> **WARNING**: if multiple modules are including different versions of jar dependencies, then the order in which that these will be picked up by the class loader is undefined.
### File: `settings.gradle`

You will also want to change the `settings.gradle` file:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import java.util.Map;

import synapticloop.nanohttpd.utils.HttpUtils;
import synapticloop.nanohttpd.utils.MimeTypeMapper;
import synapticloop.templar.Parser;
import synapticloop.templar.exception.ParseException;
import synapticloop.templar.exception.RenderException;
Expand Down

0 comments on commit f8b9d10

Please sign in to comment.