Skip to content

Commit

Permalink
#33 Build project using Gradle (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
vityaman authored Oct 5, 2024
1 parent 63fab7d commit 87daf0f
Show file tree
Hide file tree
Showing 36 changed files with 646 additions and 1,114 deletions.
14 changes: 4 additions & 10 deletions .github/workflows/maven.yml → .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Maven
name: Gradle

on:
push:
Expand All @@ -21,13 +21,7 @@ jobs:
with:
java-version: '21'
distribution: 'temurin'
cache: maven
cache: gradle

- name: Compile
run: mvn compile

- name: Unit Test
run: mvn test

- name: Package
run: mvn package
- name: Build
run: gradle build
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,8 @@ replay_pid*

# Maven
target/

# Gradle
build/
.gradle/
.idea
7 changes: 7 additions & 0 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
plugins {
`kotlin-dsl`
}

repositories {
gradlePluginPortal()
}
23 changes: 23 additions & 0 deletions buildSrc/src/main/kotlin/buildlogic.java-conventions.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
plugins {
`java-base`
}

repositories {
mavenLocal()
maven {
url = uri("https://repo.maven.apache.org/maven2/")
}
}

group = "ru.ifmo.se.dating"
version = "1.0.0"

java.sourceCompatibility = JavaVersion.VERSION_20

tasks.withType<JavaCompile>() {
options.encoding = "UTF-8"
}

tasks.withType<Javadoc>() {
options.encoding = "UTF-8"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
plugins {
id("buildlogic.java-conventions")
`java-library`
}
20 changes: 0 additions & 20 deletions common/pom.xml

This file was deleted.

9 changes: 9 additions & 0 deletions common/testing/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
plugins {
id("buildlogic.java-library-conventions")
}

dependencies {
api(libs.org.testcontainers.postgresql)
api(libs.junit.junit)
compileOnly(libs.org.projectlombok.lombok)
}
32 changes: 0 additions & 32 deletions common/testing/pom.xml

This file was deleted.

4 changes: 2 additions & 2 deletions compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ services:
matchmaker:
image: eclipse-temurin:21-jdk-alpine
volumes:
- ./matchmaker/app/target/matchmaker-app-1.0.0.jar:/matchmaker.jar
- ./matchmaker/app/build/libs/matchmaker-app-1.0.0.jar:/matchmaker.jar
command: java -jar /matchmaker.jar
environment:
POSTGRES_DB: ${ITMO_DATING_MATCHMAKER_POSTGRES_DB?:err}
Expand All @@ -27,7 +27,7 @@ services:
people:
image: eclipse-temurin:21-jdk-alpine
volumes:
- ./people/app/target/people-app-1.0.0.jar:/people.jar
- ./people/app/build/libs/people-app-1.0.0.jar:/people.jar
command: java -jar /people.jar
environment:
POSTGRES_DB: ${ITMO_DATING_PEOPLE_POSTGRES_DB?:err}
Expand Down
46 changes: 0 additions & 46 deletions config/checkstyle-suppressions.xml

This file was deleted.

105 changes: 0 additions & 105 deletions config/checkstyle.xml

This file was deleted.

12 changes: 0 additions & 12 deletions config/spotbugs-suppressions.xml

This file was deleted.

41 changes: 41 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[versions]
com-fasterxml-jackson-core-jackson-databind = "2.17.2"
io-swagger-core-v3-swagger-annotations = "2.2.23"
io-swagger-core-v3-swagger-models = "2.2.23"
javax-annotation-javax-annotation-api = "1.3.2"
javax-servlet-javax-servlet-api = "4.0.1"
javax-validation-validation-api = "2.0.1.Final"
junit-junit = "4.13.2"
org-liquibase-liquibase-core = "4.29.2"
org-openapitools-jackson-databind-nullable = "0.2.6"
org-postgresql-postgresql = "42.7.4"
org-projectlombok-lombok = "1.18.34"
org-springdoc-springdoc-openapi-starter-webmvc-ui = "2.6.0"
org-springframework-boot-spring-boot = "3.3.4"
org-springframework-boot-spring-boot-starter-jdbc = "3.3.4"
org-springframework-boot-spring-boot-starter-test = "3.3.4"
org-springframework-boot-spring-boot-starter-web = "3.3.4"
org-springframework-spring-context = "6.1.13"
org-springframework-spring-web = "6.1.13"
org-testcontainers-postgresql = "1.20.1"

[libraries]
com-fasterxml-jackson-core-jackson-databind = { module = "com.fasterxml.jackson.core:jackson-databind", version.ref = "com-fasterxml-jackson-core-jackson-databind" }
io-swagger-core-v3-swagger-annotations = { module = "io.swagger.core.v3:swagger-annotations", version.ref = "io-swagger-core-v3-swagger-annotations" }
io-swagger-core-v3-swagger-models = { module = "io.swagger.core.v3:swagger-models", version.ref = "io-swagger-core-v3-swagger-models" }
javax-annotation-javax-annotation-api = { module = "javax.annotation:javax.annotation-api", version.ref = "javax-annotation-javax-annotation-api" }
javax-servlet-javax-servlet-api = { module = "javax.servlet:javax.servlet-api", version.ref = "javax-servlet-javax-servlet-api" }
javax-validation-validation-api = { module = "javax.validation:validation-api", version.ref = "javax-validation-validation-api" }
junit-junit = { module = "junit:junit", version.ref = "junit-junit" }
org-liquibase-liquibase-core = { module = "org.liquibase:liquibase-core", version.ref = "org-liquibase-liquibase-core" }
org-openapitools-jackson-databind-nullable = { module = "org.openapitools:jackson-databind-nullable", version.ref = "org-openapitools-jackson-databind-nullable" }
org-postgresql-postgresql = { module = "org.postgresql:postgresql", version.ref = "org-postgresql-postgresql" }
org-projectlombok-lombok = { module = "org.projectlombok:lombok", version.ref = "org-projectlombok-lombok" }
org-springdoc-springdoc-openapi-starter-webmvc-ui = { module = "org.springdoc:springdoc-openapi-starter-webmvc-ui", version.ref = "org-springdoc-springdoc-openapi-starter-webmvc-ui" }
org-springframework-boot-spring-boot = { module = "org.springframework.boot:spring-boot", version.ref = "org-springframework-boot-spring-boot" }
org-springframework-boot-spring-boot-starter-jdbc = { module = "org.springframework.boot:spring-boot-starter-jdbc", version.ref = "org-springframework-boot-spring-boot-starter-jdbc" }
org-springframework-boot-spring-boot-starter-test = { module = "org.springframework.boot:spring-boot-starter-test", version.ref = "org-springframework-boot-spring-boot-starter-test" }
org-springframework-boot-spring-boot-starter-web = { module = "org.springframework.boot:spring-boot-starter-web", version.ref = "org-springframework-boot-spring-boot-starter-web" }
org-springframework-spring-context = { module = "org.springframework:spring-context", version.ref = "org-springframework-spring-context" }
org-springframework-spring-web = { module = "org.springframework:spring-web", version.ref = "org-springframework-spring-web" }
org-testcontainers-postgresql = { module = "org.testcontainers:postgresql", version.ref = "org-testcontainers-postgresql" }
7 changes: 7 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 87daf0f

Please sign in to comment.