-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Juan Manuel Leflet Estrada <[email protected]>
- Loading branch information
Showing
24 changed files
with
1,218 additions
and
266 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
105 changes: 105 additions & 0 deletions
105
external-providers/java-external-provider/examples/gradle-multi-project-example/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
### Intellij+iml ### | ||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 | ||
|
||
# User-specific stuff: | ||
.idea/**/workspace.xml | ||
.idea/**/tasks.xml | ||
.idea/dictionaries | ||
|
||
# Sensitive or high-churn files: | ||
.idea/**/dataSources/ | ||
.idea/**/dataSources.ids | ||
.idea/**/dataSources.xml | ||
.idea/**/dataSources.local.xml | ||
.idea/**/sqlDataSources.xml | ||
.idea/**/dynamic.xml | ||
.idea/**/uiDesigner.xml | ||
|
||
# Gradle: | ||
.idea/**/gradle.xml | ||
.idea/**/libraries | ||
|
||
## File-based project format: | ||
*.iws | ||
|
||
## Plugin-specific files: | ||
|
||
# IntelliJ | ||
/out/ | ||
|
||
# mpeltonen/sbt-idea plugin | ||
.idea_modules/ | ||
|
||
# Crashlytics plugin (for Android Studio and IntelliJ) | ||
com_crashlytics_export_strings.xml | ||
crashlytics.properties | ||
crashlytics-build.properties | ||
fabric.properties | ||
|
||
### Intellij+iml Patch ### | ||
# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023 | ||
|
||
.idea/ | ||
|
||
*.iml | ||
modules.xml | ||
.idea/misc.xml | ||
*.ipr | ||
|
||
### Java ### | ||
# Compiled class file | ||
*.class | ||
|
||
# Log file | ||
*.log | ||
|
||
# Package Files # | ||
*.jar | ||
*.war | ||
*.ear | ||
*.zip | ||
*.tar.gz | ||
*.rar | ||
|
||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml | ||
hs_err_pid* | ||
|
||
### macOS ### | ||
*.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
|
||
# Icon must end with two \r | ||
Icon | ||
|
||
# Thumbnails | ||
._* | ||
|
||
# Files that might appear in the root of a volume | ||
.DocumentRevisions-V100 | ||
.fseventsd | ||
.Spotlight-V100 | ||
.TemporaryItems | ||
.Trashes | ||
.VolumeIcon.icns | ||
.com.apple.timemachine.donotpresent | ||
|
||
# Directories potentially created on remote AFP share | ||
.AppleDB | ||
.AppleDesktop | ||
Network Trash Folder | ||
Temporary Items | ||
.apdisk | ||
|
||
### Gradle ### | ||
.gradle | ||
**/build/ | ||
|
||
# Ignore Gradle GUI config | ||
gradle-app.setting | ||
|
||
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) | ||
!gradle-wrapper.jar | ||
|
||
# Cache of project | ||
.gradletasknamecache |
21 changes: 21 additions & 0 deletions
21
external-providers/java-external-provider/examples/gradle-multi-project-example/LICENSE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) [year] [author] | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
2 changes: 2 additions & 0 deletions
2
external-providers/java-external-provider/examples/gradle-multi-project-example/Procfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
web: java -jar build/libs/template-server-all.jar | ||
worker: java -jar build/libs/template-core-all.jar |
53 changes: 53 additions & 0 deletions
53
...roviders/java-external-provider/examples/gradle-multi-project-example/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# gradle-multi-project-example | ||
|
||
Basic gradle template with subprojects, deployable to Heroku as separate dyno processes. | ||
|
||
## What's included? | ||
|
||
1. Gradle Plugins | ||
- application plugin | ||
- shadowjar plugin | ||
2. Code Style | ||
- checkstyle | ||
- findbugs | ||
- pmd | ||
3. General Libraries | ||
- guava | ||
- junit | ||
- mockito | ||
- log4j2 via slf4j | ||
4. Multi-Project Gradle Setup | ||
- see: [settings.gradle](settings.gradle) | ||
5. Heroku Deployment | ||
- see: [Procfile](Procfile), [stage.gradle](gradle/heroku/stage.gradle) | ||
|
||
## Development | ||
|
||
### Building | ||
|
||
``` | ||
$ ./gradlew clean build | ||
``` | ||
|
||
### Testing | ||
|
||
``` | ||
$ ./gradlew clean test | ||
``` | ||
|
||
### Building Deployment Artifacts | ||
|
||
``` | ||
$ ./gradlew clean stage | ||
``` | ||
|
||
### Running | ||
|
||
Use the Gradle [application plugin](https://docs.gradle.org/current/userguide/application_plugin.html). | ||
However, `./gradlew run` will run applications in lexicographical order. | ||
Instead, explicitly specify which subproject to run: | ||
|
||
``` | ||
$ ./gradlew template-core:run | ||
$ ./gradlew template-server:run | ||
``` |
47 changes: 47 additions & 0 deletions
47
external-providers/java-external-provider/examples/gradle-multi-project-example/build.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
apply plugin: 'idea' | ||
|
||
ext { | ||
log4jVersion = '2.9.1' | ||
} | ||
|
||
buildscript { | ||
repositories { | ||
jcenter() | ||
} | ||
dependencies { | ||
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.1' | ||
} | ||
} | ||
|
||
allprojects { | ||
repositories { | ||
mavenLocal() | ||
mavenCentral() // maven { url: 'http://jcenter.bintray.com' } | ||
} | ||
} | ||
|
||
apply from: file('gradle/check.gradle') | ||
apply from: file('gradle/heroku/clean.gradle') | ||
|
||
subprojects { | ||
apply plugin: 'com.github.johnrengelman.shadow' | ||
apply plugin: 'java' | ||
|
||
group = "io.jeffchao.${rootProject.name}" | ||
|
||
dependencies { | ||
implementation 'com.google.guava:guava:23.0' | ||
|
||
testImplementation 'junit:junit:4.12' | ||
|
||
compile "org.apache.logging.log4j:log4j-api:$log4jVersion" | ||
compile "org.apache.logging.log4j:log4j-core:$log4jVersion" | ||
compile "org.apache.logging.log4j:log4j-slf4j-impl:$log4jVersion" | ||
|
||
testCompile 'org.mockito:mockito-core:2.11.0' | ||
|
||
} | ||
|
||
apply from: file("$rootProject.projectDir/gradle/heroku/stage.gradle") | ||
|
||
} |
Oops, something went wrong.