Skip to content

Commit

Permalink
update gradleplugin, gradle, java, ci
Browse files Browse the repository at this point in the history
  • Loading branch information
makeevrserg committed May 31, 2024
1 parent 155645b commit 05a5fa9
Show file tree
Hide file tree
Showing 13 changed files with 98 additions and 40 deletions.
23 changes: 23 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
version: 2
updates:
- package-ecosystem: "gradle"
directory: "/"
schedule:
interval: "weekly"
rebase-strategy: "disabled"
groups:
versions:
dependency-type: production
applies-to: version-updates
open-pull-requests-limit: 1

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
groups:
versions:
dependency-type: production
applies-to: version-updates
rebase-strategy: "disabled"
open-pull-requests-limit: 1
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Git repo
uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v2
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 17
java-version: 21
- name: Give gradle permission
run: chmod +x gradlew
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
uses: gradle/gradle-build-action@v3
with:
arguments: build --stacktrace
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,31 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Git repo
uses: actions/checkout@v2
uses: actions/checkout@v4
- uses: christian-draeger/[email protected]
id: properties
with:
path: './gradle.properties'
properties: 'makeevrserg.project.name makeevrserg.project.version.string'
- name: Set up JDK 17
uses: actions/setup-java@v2
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 17
java-version: 21
- name: Give gradle permission
run: chmod +x gradlew
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
uses: gradle/gradle-build-action@v3
with:
arguments: shadowJar --stacktrace
arguments: :plugin:shadowJar --stacktrace
- name: Create release
id: create_internal_release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.ACTIONS_TOKEN }}
with:
files: |
./jars/${{ steps.properties.outputs.makeevrserg-project-name }}-${{ steps.properties.outputs.makeevrserg-project-version-string }}.jar
./jars/*.jar
tag_name: ${{ steps.properties.outputs.makeevrserg-project-version-string }}
name: ${{ steps.properties.outputs.makeevrserg-project-name }} - ${{ steps.properties.outputs.makeevrserg-project-version-string }}
draft: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ jobs:
name: "Check project by detekt"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 1.17
uses: actions/setup-java@v2
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
java-version: '21'
- name: Give gradle permission
run: chmod +x gradlew
- name: detekt
uses: gradle/gradle-build-action@v2
uses: gradle/gradle-build-action@v3
with:
arguments: detekt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ jobs:
name: "Gradle Wrapper Validation"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
uses: gradle/wrapper-validation-action@v3
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ jobs:
name: "Run tests"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '17'
java-version: '21'
- name: Give gradle permission
run: chmod +x gradlew
- name: Run tests
uses: gradle/gradle-build-action@v2
uses: gradle/gradle-build-action@v3
with:
arguments: cleanTest test
10 changes: 5 additions & 5 deletions .github/workflows/check-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ on:
jobs:
gradle_validation:
name: Validate gradle wrapper
uses: ./.github/workflows/gradle-wrapper-validation.yml
uses: ./.github/workflows/call-gradle-wrapper-validation.yml
detekt_validation:
name: Check by detekt
needs: gradle_validation
uses: ./.github/workflows/detekt-validation.yml
uses: ./.github/workflows/call-detekt-validation.yml
tests_validation:
needs: gradle_validation
uses: ./.github/workflows/tests-validation.yml
uses: ./.github/workflows/call-tests-validation.yml
build:
name: Build project
needs: [ gradle_validation, detekt_validation ]
uses: ./.github/workflows/build-project.yml
needs: [ gradle_validation, detekt_validation,tests_validation ]
uses: ./.github/workflows/call-build-project.yml
35 changes: 35 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Check Develop
on:
pull_request:
branches:
- 'develop'
- 'master'

# Concurrency strategy:
# github.workflow: distinguish this workflow from others
# github.event_name: distinguish `push` event from `pull_request` event
# github.ref_name: distinguish branch
# github.repository: distinguish owner+repository
#
# Reference:
# https://docs.github.com/en/actions/using-jobs/using-concurrency
# https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{github.ref_name}}-${{github.repository}}
cancel-in-progress: true

jobs:
gradle_validation:
name: Validate gradle wrapper
uses: ./.github/workflows/call-gradle-wrapper-validation.yml
detekt_validation:
name: Check by detekt
needs: gradle_validation
uses: ./.github/workflows/call-detekt-validation.yml
tests_validation:
needs: gradle_validation
uses: ./.github/workflows/call-tests-validation.yml
build:
name: Build project
needs: [ gradle_validation, detekt_validation, tests_validation ]
uses: ./.github/workflows/call-build-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ on:
- master
jobs:
gradle_validation:
uses: ./.github/workflows/gradle-wrapper-validation.yml
uses: ./.github/workflows/call-gradle-wrapper-validation.yml
detekt_validation:
needs: gradle_validation
uses: ./.github/workflows/detekt-validation.yml
uses: ./.github/workflows/call-detekt-validation.yml
tests_validation:
needs: gradle_validation
uses: ./.github/workflows/tests-validation.yml
uses: ./.github/workflows/call-tests-validation.yml
create_artifact:
needs: [ gradle_validation, detekt_validation, tests_validation ]
uses: ./.github/workflows/create-artifacts.yml
uses: ./.github/workflows/call-create-artifacts.yml
secrets:
ACTIONS_TOKEN: ${{ secrets.ACTIONS_TOKEN }}
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
kotlin.code.style=official
# Java
makeevrserg.java.source=8
makeevrserg.java.target=17
makeevrserg.java.ktarget=17
makeevrserg.java.target=21
makeevrserg.java.ktarget=21
# Project
makeevrserg.project.name=AstraMarket
makeevrserg.project.group=ru.astrainteractive.astramarket
makeevrserg.project.version.string=1.11.0
makeevrserg.project.version.string=1.12.0-unstable
makeevrserg.project.description=Market plugin for EmpireSMP
makeevrserg.project.developers=makeevrserg|Makeev Roman|[email protected]
makeevrserg.project.url=https://empireprojekt.ru
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ driver-jdbc = "3.45.3.0" # https://github.com/xerial/sqlite-jdbc
driver-mysql = "8.0.33" # https://github.com/mysql/mysql-connector-j

# klibs
klibs-gradleplugin = "1.0.0-alpha01" # https://github.com/makeevrserg/gradle-plugin
klibs-gradleplugin = "1.2.0" # https://github.com/makeevrserg/gradle-plugin
klibs-mikro = "1.6.0-beta" # https://github.com/makeevrserg/klibs.mikro
klibs-kdi = "1.3.2" # https://github.com/makeevrserg/klibs.kdi

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ enum class AuctionSort {
PRICE_DESC,
PRICE_ASC,
PLAYER_ASC,
PLAYER_DESC;
PLAYER_DESC
}

0 comments on commit 05a5fa9

Please sign in to comment.