Skip to content

Commit

Permalink
Merge pull request #2 from makeevrserg/update-version
Browse files Browse the repository at this point in the history
up versions
  • Loading branch information
makeevrserg authored Jun 20, 2024
2 parents 947f343 + 47f11f2 commit 1122b66
Show file tree
Hide file tree
Showing 15 changed files with 222 additions and 9 deletions.
29 changes: 29 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
version: 2
updates:
- package-ecosystem: "gradle"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "08:00"
timezone: "Europe/Moscow"
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"
day: "monday"
time: "08:00"
timezone: "Europe/Moscow"
groups:
versions:
dependency-type: production
applies-to: version-updates
rebase-strategy: "disabled"
open-pull-requests-limit: 1
21 changes: 21 additions & 0 deletions .github/workflows/call-build-project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "detekt-validation"
on:
workflow_call:
jobs:
build:
name: Build project with gradle
runs-on: ubuntu-latest
steps:
- name: Checkout Git repo
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 21
- name: Give gradle permission
run: chmod +x gradlew
- name: Build with Gradle
uses: gradle/gradle-build-action@v3
with:
arguments: :plugin:buildPlugin --stacktrace
41 changes: 41 additions & 0 deletions .github/workflows/call-create-artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: "detekt-validation"
on:
workflow_call:
secrets:
ACTIONS_TOKEN:
required: true
jobs:
publish:
name: Build and upload
runs-on: ubuntu-latest
steps:
- name: Checkout Git repo
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 21
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 21
- name: Give gradle permission
run: chmod +x gradlew
- name: Build with Gradle
uses: gradle/gradle-build-action@v3
with:
arguments: :plugin:buildPlugin --stacktrace
- name: Create release
id: create_internal_release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.ACTIONS_TOKEN }}
with:
files: |
./plugin/build/distributions/*.zip
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
prerelease: false
20 changes: 20 additions & 0 deletions .github/workflows/call-detekt-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "detekt-validation"
on:
workflow_call:
jobs:
detekt:
name: "Check project by detekt"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Give gradle permission
run: chmod +x gradlew
- name: detekt
uses: gradle/gradle-build-action@v3
with:
arguments: detekt
12 changes: 12 additions & 0 deletions .github/workflows/call-gradle-wrapper-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: "gradle-wrapper-validation"
on:
workflow_call:

jobs:
validation:
name: "Gradle Wrapper Validation"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v3
21 changes: 21 additions & 0 deletions .github/workflows/call-tests-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "tests"
on:
workflow_call:

jobs:
tests:
name: "Run tests"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '21'
- name: Give gradle permission
run: chmod +x gradlew
- name: Run tests
uses: gradle/gradle-build-action@v3
with:
arguments: test
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
13 changes: 13 additions & 0 deletions .github/workflows/release-master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: CI
on:
push:
branches:
- master
jobs:
gradle_validation:
uses: ./.github/workflows/call-gradle-wrapper-validation.yml
create_artifact:
needs: [ gradle_validation ]
uses: ./.github/workflows/call-create-artifacts.yml
secrets:
ACTIONS_TOKEN: ${{ secrets.ACTIONS_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.gradle
.idea
local.properties
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
Expand Down
4 changes: 3 additions & 1 deletion core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ plugins {

repositories {
mavenCentral()
maven("https://www.jetbrains.com/intellij-repository/releases")
maven("https://cache-redirector.jetbrains.com/intellij-dependencies")
}

dependencies {
implementation(libs.kotlin.coroutines.swing)
}

intellij {
version.set("2022.2.5")
version.set("2023.2.7")
type.set("IC")
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ makeevrserg.java.ktarget=17
# Project
makeevrserg.project.name=MVIKotlin-IntelliJ-Plugin
makeevrserg.project.group=com.makeevrserg.mvikotlin.intellij.plugin
makeevrserg.project.version.string=0.2.5
makeevrserg.project.version.string=0.3.0
makeevrserg.project.description=IntelliJ Plugin for MVIKotlin/Decompose library
makeevrserg.project.developers=makeevrserg|Makeev Roman|[email protected]
makeevrserg.project.url=https://empireprojekt.ru
7 changes: 4 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
[versions]
# Kotlin
kotlin-version = "1.9.21"
kotlin-coroutines = "1.7.3"
kotlin-version = "2.0.0" # https://github.com/JetBrains/kotlin
kotlin-coroutines = "1.9.0-RC" # https://github.com/Kotlin/kotlinx.coroutines
jetbrains-intellij = "1.17.4" # https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#ide-configuration

[libraries]
kotlin-gradle = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin-version" }
Expand All @@ -11,4 +12,4 @@ kotlin-coroutines-swing = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-s
# Kotlin
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin-version" }
kotlin-gradle = { id = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin-version" }
intellij = { id = "org.jetbrains.intellij", version.strictly = "1.16.1" }
intellij = { id = "org.jetbrains.intellij", version.ref = "jetbrains-intellij" }
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-8.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
11 changes: 8 additions & 3 deletions plugin/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import ru.astrainteractive.gradleplugin.util.ProjectProperties.projectInfo

plugins {
id("java")
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.intellij)
}
repositories {
mavenCentral()
maven("https://www.jetbrains.com/intellij-repository/releases")
maven("https://cache-redirector.jetbrains.com/intellij-dependencies")
}
dependencies {
implementation(libs.kotlin.coroutines.swing)
Expand All @@ -14,7 +18,8 @@ dependencies {
// Configure Gradle IntelliJ Plugin
// Read more: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html
intellij {
version.set("2022.3.3")
pluginName = projectInfo.name
version.set("2023.2.7")
type.set("IC") // Target IDE Platform

plugins.set(listOf(/* Plugin Dependencies */))
Expand All @@ -30,8 +35,8 @@ tasks {
}

patchPluginXml {
sinceBuild.set("223")
untilBuild.set("233.*")
sinceBuild.set("232")
untilBuild.set("242.*")
}

signPlugin {
Expand Down
12 changes: 12 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,24 @@ pluginManagement {
mavenLocal()
mavenCentral()
gradlePluginPortal()
google()
}
}

dependencyResolutionManagement {
repositories {
gradlePluginPortal()
mavenLocal()
mavenCentral()
maven("https://www.jetbrains.com/intellij-repository/releases")
maven("https://cache-redirector.jetbrains.com/intellij-dependencies")
}
}

buildscript {
repositories {
mavenCentral()
mavenLocal()
}
}

Expand Down

0 comments on commit 1122b66

Please sign in to comment.