Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply gradle and deprecate maven to build project #15

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.idea/
classes/
target/
**/out/
.gradle/
build/
*.iml
*.ipr
*.iws
Binary file removed .mvn/wrapper/maven-wrapper.jar
Binary file not shown.
1 change: 0 additions & 1 deletion .mvn/wrapper/maven-wrapper.properties

This file was deleted.

5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM openjdk:8-jdk-alpine
EXPOSE 8080
VOLUME /tmp
ADD app/build/libs/app-1.0.jar app.jar
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]
54 changes: 0 additions & 54 deletions Scorpio.iml

This file was deleted.

70 changes: 0 additions & 70 deletions app/app.iml

This file was deleted.

25 changes: 25 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'org.springframework.boot:spring-boot-gradle-plugin:2.0.1.RELEASE'
}
}

apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'

dependencies {
implementation project(':lib')

implementation ('org.springframework.boot:spring-boot-starter-web') {
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-core'
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-databind'
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-annotations'
}

implementation 'org.springframework:spring-websocket'

testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
47 changes: 0 additions & 47 deletions app/pom.xml

This file was deleted.

2 changes: 1 addition & 1 deletion app/src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
kafka:
bootstrap-servers: localhost:9092
bootstrap-servers: 172.17.16.16:9092
topic:
test: test
pricing:
Expand Down
35 changes: 35 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
allprojects {

group 'scorpio'
version '1.0'

apply plugin: 'idea'

repositories {
mavenCentral()
}
}

subprojects {

apply plugin: 'java'

compileJava {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}

dependencies {
implementation 'org.springframework.kafka:spring-kafka:2.1.5.RELEASE'

implementation 'com.fasterxml.jackson.core:jackson-core:2.9.5'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.9.5'
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.9.5'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove all the dependencies and put it into the app only?


implementation 'org.slf4j:slf4j-api:1.7.25'
implementation 'com.google.guava:guava:19.0'
implementation 'org.apache.commons:commons-lang3:3.6'

testImplementation("junit:junit:4.12")
}
}
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 6 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#Sun Apr 29 00:09:01 CST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-all.zip
Loading