Skip to content
Draft
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
Binary file not shown.
Binary file not shown.
Binary file modified java-backend/target/classes/com/shopper/config/BeanConfig.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified java-backend/target/classes/com/shopper/config/OpenApiConfig.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified java-backend/target/classes/com/shopper/config/SecurityConfig.class
Binary file not shown.
Binary file modified java-backend/target/classes/com/shopper/config/WebConfig.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified java-backend/target/classes/com/shopper/dto/AddToCartDto.class
Binary file not shown.
Binary file not shown.
Binary file modified java-backend/target/classes/com/shopper/dto/AuthResponseDto.class
Binary file not shown.
Binary file modified java-backend/target/classes/com/shopper/dto/CreateOrderDto.class
Binary file not shown.
Binary file modified java-backend/target/classes/com/shopper/dto/CreateProductDto.class
Binary file not shown.
Binary file modified java-backend/target/classes/com/shopper/dto/LoginDto.class
Binary file not shown.
Binary file modified java-backend/target/classes/com/shopper/dto/RegisterDto.class
Binary file not shown.
Binary file modified java-backend/target/classes/com/shopper/dto/UpdateCartItemDto.class
Binary file not shown.
Binary file modified java-backend/target/classes/com/shopper/dto/UpdateProductDto.class
Binary file not shown.
Binary file not shown.
Binary file modified java-backend/target/classes/com/shopper/entity/CartItem.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified java-backend/target/classes/com/shopper/entity/Order.class
Binary file not shown.
Binary file not shown.
Binary file modified java-backend/target/classes/com/shopper/entity/OrderItem.class
Binary file not shown.
Binary file not shown.
Binary file modified java-backend/target/classes/com/shopper/entity/Product.class
Binary file not shown.
Binary file modified java-backend/target/classes/com/shopper/entity/User$Role.class
Binary file not shown.
Binary file not shown.
Binary file modified java-backend/target/classes/com/shopper/entity/User.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified java-backend/target/classes/com/shopper/security/JwtUtil.class
Binary file not shown.
Binary file modified java-backend/target/classes/com/shopper/service/AdminService.class
Binary file not shown.
Binary file modified java-backend/target/classes/com/shopper/service/CartService.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified java-backend/target/classes/com/shopper/service/OrderService.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
88 changes: 88 additions & 0 deletions java-server-hooks/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: CI

on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
java: [11, 17, 21]

steps:
- uses: actions/checkout@v4

- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'

- name: Cache Gradle packages
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Run tests
run: ./gradlew test

- name: Generate test report
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: Tests (Java ${{ matrix.java }})
path: build/test-results/test/*.xml
reporter: java-junit

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
if: matrix.java == '11'
with:
file: build/reports/jacoco/test/jacocoTestReport.xml

build:
runs-on: ubuntu-latest
needs: test

steps:
- uses: actions/checkout@v4

- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'

- name: Cache Gradle packages
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Build with Gradle
run: ./gradlew build

- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: build-artifacts
path: build/libs/
45 changes: 45 additions & 0 deletions java-server-hooks/.github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Publish

on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'

- name: Cache Gradle packages
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1

- name: Run tests
run: ./gradlew test

- name: Publish to Sonatype OSSRH and Maven Central
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
86 changes: 86 additions & 0 deletions java-server-hooks/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Gradle
.gradle/
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

# Maven
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
.mvn/wrapper/maven-wrapper.jar

# IntelliJ IDEA
.idea/
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/

# Eclipse
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

# NetBeans
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

# VS Code
.vscode/

# macOS
.DS_Store

# Windows
Thumbs.db
ehthumbs.db
Desktop.ini

# Package Files
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# Log files
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*

# Test output
test-output/
**/target/

# Gradle signing
gradle.properties.local
21 changes: 21 additions & 0 deletions java-server-hooks/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 DevCycle

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading