Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
haiphucnguyen committed Dec 28, 2024
1 parent 2ed39f5 commit 639adaf
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 39 deletions.
35 changes: 30 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,36 @@ allprojects {
}

subprojects {
afterEvaluate {
if (it.plugins.hasPlugin('java') || it.plugins.hasPlugin('java-library')) {
java {
sourceCompatibility=21
targetCompatibility=21
afterEvaluate { project ->
if (project.plugins.hasPlugin('java') || project.plugins.hasPlugin('java-library')) {
project.java {
sourceCompatibility = 21
targetCompatibility = 21
}
}

if (project.plugins.hasPlugin('java-library')) {
project.apply(plugin: 'maven-publish')

project.publishing {
publications {
// Check if the publication already exists
if (!project.publishing.publications.names.contains("${project.name}MavenJava")) {
create("${project.name}MavenJava", MavenPublication) {
from project.components.java
}
}
}
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/flowinquiry/flowinquiry-server")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_ACTOR")
password = project.findProperty("gpr.token") ?: System.getenv("GITHUB_TOKEN")
}
}
}
}
}
}
Expand Down
1 change: 0 additions & 1 deletion buildSrc/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
dependencyResolutionManagement {
// Reuse version catalog from the main build.
versionCatalogs {
create('libs', { from(files("../gradle/libs.versions.toml")) })
}
Expand Down
21 changes: 1 addition & 20 deletions commons/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ dependencies {
exclude group: "com.sun.xml.bind"
}
api(libs.jhipster.framework)
api(libs.liquibase)
api project(":tools:liquibase")


api("com.fasterxml.jackson.module:jackson-module-jaxb-annotations")
Expand Down Expand Up @@ -59,7 +59,6 @@ dependencies {
api("org.springframework.security:spring-security-data")



testImplementation platform('org.junit:junit-bom:5.10.0')
testImplementation 'org.junit.jupiter:junit-jupiter'
testImplementation(libs.assertJ)
Expand All @@ -78,22 +77,4 @@ dependencies {

test {
useJUnitPlatform()
}

publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/flowinquiry/flowinquiry-server")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_ACTOR")
password = project.findProperty("gpr.token") ?: System.getenv("GITHUB_TOKEN")
}
}
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package io.flowinquiry.exceptions;

public class ResourceNotFoundException extends RuntimeException {

public ResourceNotFoundException(String message) {
super(message);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
import java.nio.file.Files;
import java.nio.file.Paths;
import javax.imageio.ImageIO;
import org.jclouds.rest.ResourceNotFoundException;

import io.flowinquiry.exceptions.ResourceNotFoundException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import org.jclouds.rest.ResourceNotFoundException;
import io.flowinquiry.exceptions.ResourceNotFoundException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.data.domain.Page;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import io.flowinquiry.security.SecurityUtils;
import io.flowinquiry.utils.Random;
import jakarta.persistence.EntityNotFoundException;
import org.jclouds.rest.ResourceNotFoundException;
import io.flowinquiry.exceptions.ResourceNotFoundException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationEventPublisher;
Expand Down
1 change: 0 additions & 1 deletion server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ configurations {

dependencies {
api project(":commons")
api project(":tools:liquibase")


testImplementation("org.testcontainers:jdbc")
Expand Down
4 changes: 2 additions & 2 deletions tools/liquibase/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'java'
id 'java-library'
id "flowinquiry.code-conventions"
}

Expand All @@ -10,7 +10,7 @@ repositories {
}

dependencies {

api(libs.liquibase)
}

test {
Expand Down

0 comments on commit 639adaf

Please sign in to comment.