forked from airbytehq/airbyte
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate API code + bootstrap webserver + simplify launch (airbytehq#8)
- Loading branch information
1 parent
51920f2
commit 7491c94
Showing
17 changed files
with
954 additions
and
41 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
.gradle | ||
.idea | ||
build | ||
.DS_Store |
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
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 |
---|---|---|
@@ -1,14 +1,9 @@ | ||
# Conduit | ||
## Getting Started | ||
|
||
### Docker | ||
Simply run | ||
``` | ||
docker run --rm -it dataline/conduit:$VERSION | ||
./tools/app/start.sh | ||
``` | ||
|
||
### Repo | ||
``` | ||
VERSION=$(cat .version) | ||
docker build . -t dataline/conduit:$VERSION | ||
docker run --rm -it dataline/conduit:$VERSION | ||
``` | ||
And go to [http://localhost:8080]() |
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 |
---|---|---|
@@ -1,30 +1,25 @@ | ||
plugins { | ||
id 'java' | ||
allprojects { | ||
group = "io.dataline.${rootProject.name}" | ||
version = rootProject.file('.version').text.trim() | ||
} | ||
|
||
group 'io.dataline' | ||
version = rootProject.file('.version').text.trim() | ||
// For java projects (might need to add some filtering once we have the UI) | ||
subprojects { | ||
apply plugin: 'java' | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
test { | ||
useJUnitPlatform() | ||
} | ||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
compile group: 'com.google.guava', name: 'guava', version: '29.0-jre' | ||
test { | ||
useJUnitPlatform() | ||
} | ||
|
||
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.4.2' | ||
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.4.2' | ||
} | ||
dependencies { | ||
implementation group: 'com.google.guava', name: 'guava', version: '29.0-jre' | ||
|
||
task fatjar(type: Jar) { | ||
manifest { | ||
attributes 'Main-Class': 'io.dataline.playground.HelloWorld' | ||
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.4.2' | ||
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.4.2' | ||
testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '3.4.6' | ||
} | ||
baseName "${rootProject.name}-fatjar" | ||
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } } | ||
with jar | ||
} |
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 @@ | ||
plugins { | ||
id "org.openapi.generator" version "4.3.1" | ||
id "java-library" | ||
} | ||
|
||
def specFile = "$projectDir/src/main/openapi/conduit.yaml".toString() | ||
|
||
openApiGenerate { | ||
generatorName = "jaxrs-spec" | ||
inputSpec = specFile | ||
outputDir = "$buildDir/generated".toString() | ||
|
||
apiPackage = "io.dataline.conduit.api" | ||
invokerPackage = "io.dataline.conduit.api.invoker" | ||
modelPackage = "io.dataline.conduit.api.model" | ||
|
||
generateApiDocumentation = false | ||
|
||
configOptions = [ | ||
dateLibrary : "java8", | ||
generatePom : "false", | ||
interfaceOnly: "true" | ||
] | ||
} | ||
|
||
dependencies { | ||
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.11.2' | ||
|
||
implementation group: 'io.swagger', name: 'swagger-annotations', version: '1.6.2' | ||
|
||
implementation group: 'javax.annotation', name: 'javax.annotation-api', version: '1.3.2' | ||
implementation group: 'javax.ws.rs', name: 'javax.ws.rs-api', version: '2.1.1' | ||
implementation group: 'javax.validation', name: 'validation-api', version: '2.0.1.Final' | ||
} | ||
|
||
sourceSets { | ||
main { | ||
java { | ||
srcDir "$buildDir/generated/src/gen/java" | ||
} | ||
resources { | ||
srcDir "$projectDir/src/main/openapi/" | ||
} | ||
} | ||
} | ||
|
||
compileJava.dependsOn tasks.openApiGenerate |
Oops, something went wrong.