diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy-java.yml similarity index 93% rename from .github/workflows/build-and-deploy.yml rename to .github/workflows/build-and-deploy-java.yml index 6fadc6f..8b06734 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy-java.yml @@ -46,7 +46,7 @@ jobs: - name: Create database table run: | - psql -h localhost -U postgres -d postgres -f ./app/src/main/java/org/vss/impl/postgres/sql/v0_create_vss_db.sql + psql -h localhost -U postgres -d postgres -f ./java/app/src/main/java/org/vss/impl/postgres/sql/v0_create_vss_db.sql env: PGPASSWORD: YOU_MUST_CHANGE_THIS_PASSWORD @@ -56,6 +56,7 @@ jobs: java -version gradle --version + cd java gradle wrapper --gradle-version 8.1.1 ./gradlew --version ./gradlew build diff --git a/java/.env b/java/.env new file mode 100644 index 0000000..e0a40aa --- /dev/null +++ b/java/.env @@ -0,0 +1 @@ +COMPOSE_PROJECT_NAME=vss-server-java diff --git a/Dockerfile b/java/Dockerfile similarity index 100% rename from Dockerfile rename to java/Dockerfile diff --git a/app/build.gradle b/java/app/build.gradle similarity index 97% rename from app/build.gradle rename to java/app/build.gradle index 80c4fbc..9980e95 100644 --- a/app/build.gradle +++ b/java/app/build.gradle @@ -21,6 +21,14 @@ repositories { mavenCentral() } +sourceSets { + main { + proto { + srcDir '../../proto' + } + } +} + idea { module { generatedSourceDirs.add(file("build/generated/proto/main")) diff --git a/app/src/main/java/org/vss/KVStore.java b/java/app/src/main/java/org/vss/KVStore.java similarity index 100% rename from app/src/main/java/org/vss/KVStore.java rename to java/app/src/main/java/org/vss/KVStore.java diff --git a/app/src/main/java/org/vss/VSSApplication.java b/java/app/src/main/java/org/vss/VSSApplication.java similarity index 100% rename from app/src/main/java/org/vss/VSSApplication.java rename to java/app/src/main/java/org/vss/VSSApplication.java diff --git a/app/src/main/java/org/vss/api/AbstractVssApi.java b/java/app/src/main/java/org/vss/api/AbstractVssApi.java similarity index 100% rename from app/src/main/java/org/vss/api/AbstractVssApi.java rename to java/app/src/main/java/org/vss/api/AbstractVssApi.java diff --git a/app/src/main/java/org/vss/api/DeleteObjectApi.java b/java/app/src/main/java/org/vss/api/DeleteObjectApi.java similarity index 100% rename from app/src/main/java/org/vss/api/DeleteObjectApi.java rename to java/app/src/main/java/org/vss/api/DeleteObjectApi.java diff --git a/app/src/main/java/org/vss/api/GetObjectApi.java b/java/app/src/main/java/org/vss/api/GetObjectApi.java similarity index 100% rename from app/src/main/java/org/vss/api/GetObjectApi.java rename to java/app/src/main/java/org/vss/api/GetObjectApi.java diff --git a/app/src/main/java/org/vss/api/ListKeyVersionsApi.java b/java/app/src/main/java/org/vss/api/ListKeyVersionsApi.java similarity index 100% rename from app/src/main/java/org/vss/api/ListKeyVersionsApi.java rename to java/app/src/main/java/org/vss/api/ListKeyVersionsApi.java diff --git a/app/src/main/java/org/vss/api/PutObjectsApi.java b/java/app/src/main/java/org/vss/api/PutObjectsApi.java similarity index 100% rename from app/src/main/java/org/vss/api/PutObjectsApi.java rename to java/app/src/main/java/org/vss/api/PutObjectsApi.java diff --git a/app/src/main/java/org/vss/api/VssApiEndpoint.java b/java/app/src/main/java/org/vss/api/VssApiEndpoint.java similarity index 100% rename from app/src/main/java/org/vss/api/VssApiEndpoint.java rename to java/app/src/main/java/org/vss/api/VssApiEndpoint.java diff --git a/app/src/main/java/org/vss/auth/AuthResponse.java b/java/app/src/main/java/org/vss/auth/AuthResponse.java similarity index 100% rename from app/src/main/java/org/vss/auth/AuthResponse.java rename to java/app/src/main/java/org/vss/auth/AuthResponse.java diff --git a/app/src/main/java/org/vss/auth/Authorizer.java b/java/app/src/main/java/org/vss/auth/Authorizer.java similarity index 100% rename from app/src/main/java/org/vss/auth/Authorizer.java rename to java/app/src/main/java/org/vss/auth/Authorizer.java diff --git a/app/src/main/java/org/vss/auth/NoopAuthorizer.java b/java/app/src/main/java/org/vss/auth/NoopAuthorizer.java similarity index 100% rename from app/src/main/java/org/vss/auth/NoopAuthorizer.java rename to java/app/src/main/java/org/vss/auth/NoopAuthorizer.java diff --git a/app/src/main/java/org/vss/exception/AuthException.java b/java/app/src/main/java/org/vss/exception/AuthException.java similarity index 100% rename from app/src/main/java/org/vss/exception/AuthException.java rename to java/app/src/main/java/org/vss/exception/AuthException.java diff --git a/app/src/main/java/org/vss/exception/ConflictException.java b/java/app/src/main/java/org/vss/exception/ConflictException.java similarity index 100% rename from app/src/main/java/org/vss/exception/ConflictException.java rename to java/app/src/main/java/org/vss/exception/ConflictException.java diff --git a/app/src/main/java/org/vss/exception/NoSuchKeyException.java b/java/app/src/main/java/org/vss/exception/NoSuchKeyException.java similarity index 100% rename from app/src/main/java/org/vss/exception/NoSuchKeyException.java rename to java/app/src/main/java/org/vss/exception/NoSuchKeyException.java diff --git a/app/src/main/java/org/vss/guice/BaseModule.java b/java/app/src/main/java/org/vss/guice/BaseModule.java similarity index 100% rename from app/src/main/java/org/vss/guice/BaseModule.java rename to java/app/src/main/java/org/vss/guice/BaseModule.java diff --git a/app/src/main/java/org/vss/impl/postgres/PostgresBackendImpl.java b/java/app/src/main/java/org/vss/impl/postgres/PostgresBackendImpl.java similarity index 100% rename from app/src/main/java/org/vss/impl/postgres/PostgresBackendImpl.java rename to java/app/src/main/java/org/vss/impl/postgres/PostgresBackendImpl.java diff --git a/app/src/main/java/org/vss/impl/postgres/sql/v0_create_vss_db.sql b/java/app/src/main/java/org/vss/impl/postgres/sql/v0_create_vss_db.sql similarity index 100% rename from app/src/main/java/org/vss/impl/postgres/sql/v0_create_vss_db.sql rename to java/app/src/main/java/org/vss/impl/postgres/sql/v0_create_vss_db.sql diff --git a/app/src/main/resources/application.properties b/java/app/src/main/resources/application.properties similarity index 100% rename from app/src/main/resources/application.properties rename to java/app/src/main/resources/application.properties diff --git a/app/src/test/java/org/vss/AbstractKVStoreIntegrationTest.java b/java/app/src/test/java/org/vss/AbstractKVStoreIntegrationTest.java similarity index 100% rename from app/src/test/java/org/vss/AbstractKVStoreIntegrationTest.java rename to java/app/src/test/java/org/vss/AbstractKVStoreIntegrationTest.java diff --git a/app/src/test/java/org/vss/api/DeleteObjectApiTest.java b/java/app/src/test/java/org/vss/api/DeleteObjectApiTest.java similarity index 100% rename from app/src/test/java/org/vss/api/DeleteObjectApiTest.java rename to java/app/src/test/java/org/vss/api/DeleteObjectApiTest.java diff --git a/app/src/test/java/org/vss/api/GetObjectApiTest.java b/java/app/src/test/java/org/vss/api/GetObjectApiTest.java similarity index 100% rename from app/src/test/java/org/vss/api/GetObjectApiTest.java rename to java/app/src/test/java/org/vss/api/GetObjectApiTest.java diff --git a/app/src/test/java/org/vss/api/ListKeyVersionsApiTest.java b/java/app/src/test/java/org/vss/api/ListKeyVersionsApiTest.java similarity index 100% rename from app/src/test/java/org/vss/api/ListKeyVersionsApiTest.java rename to java/app/src/test/java/org/vss/api/ListKeyVersionsApiTest.java diff --git a/app/src/test/java/org/vss/api/PutObjectsApiTest.java b/java/app/src/test/java/org/vss/api/PutObjectsApiTest.java similarity index 100% rename from app/src/test/java/org/vss/api/PutObjectsApiTest.java rename to java/app/src/test/java/org/vss/api/PutObjectsApiTest.java diff --git a/app/src/test/java/org/vss/impl/postgres/PostgresBackendImplIntegrationTest.java b/java/app/src/test/java/org/vss/impl/postgres/PostgresBackendImplIntegrationTest.java similarity index 100% rename from app/src/test/java/org/vss/impl/postgres/PostgresBackendImplIntegrationTest.java rename to java/app/src/test/java/org/vss/impl/postgres/PostgresBackendImplIntegrationTest.java diff --git a/docker-compose.yml b/java/docker-compose.yml similarity index 100% rename from docker-compose.yml rename to java/docker-compose.yml diff --git a/settings.gradle b/java/settings.gradle similarity index 100% rename from settings.gradle rename to java/settings.gradle diff --git a/app/src/main/proto/vss.proto b/proto/vss.proto similarity index 100% rename from app/src/main/proto/vss.proto rename to proto/vss.proto