Skip to content

Commit

Permalink
update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
mfarsikov committed Aug 19, 2024
1 parent d8d28cb commit 0bf3c8b
Show file tree
Hide file tree
Showing 8 changed files with 280 additions and 213 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: setupJava
uses: actions/setup-java@v2
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '8'
distribution: 'temurin'
java-version: '21'
cache: 'gradle'
- name: Check
run: ./gradlew check
8 changes: 4 additions & 4 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: setupJava
uses: actions/setup-java@v2
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '8'
distribution: 'temurin'
java-version: '21'
cache: 'gradle'
- name: Check
run: ./gradlew check
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ jobs:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: setupJava
uses: actions/setup-java@v2
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '8'
distribution: 'temurin'
java-version: '21'
cache: 'gradle'
- name: release
env:
Expand Down
123 changes: 64 additions & 59 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,58 +1,58 @@
import com.github.mfarsikov.kewt.versioning.plugin.Incrementer

plugins {
`java-gradle-plugin`
id("org.jetbrains.kotlin.jvm") version "1.7.10"
id("com.gradle.plugin-publish") version "0.14.0"
id("maven-publish")
id("com.github.mfarsikov.kewt-versioning") version "1.0.0"
`java-gradle-plugin`
id("org.jetbrains.kotlin.jvm") version "2.0.10"
id("com.gradle.plugin-publish") version "1.2.1"
id("maven-publish")
id("com.github.mfarsikov.kewt-versioning") version "1.0.0"
}

group = "com.github.mfarsikov.kewt-versioning"
kewtVersioning {
configuration {
branches {
clear()
add {
regexes = mutableListOf("master".toRegex())
incrementer = Incrementer.MINOR
stringify = stringifier(useBranch = false, useSha = false, useTimestamp = false)
}
add {
regexes = mutableListOf("fix/.*".toRegex())
incrementer = Incrementer.PATCH
stringify = stringifier(useSha = false, useTimestamp = false)
}
add {
regexes = mutableListOf(".*".toRegex())
incrementer = Incrementer.MINOR
stringify = { version ->
stringifier(
useBranch = version.isSnapshot,
useSha = false,
useTimestamp = false
)(version)
}
}
configuration {
branches {
clear()
add {
regexes = mutableListOf("master".toRegex())
incrementer = Incrementer.MINOR
stringify = stringifier(useBranch = false, useSha = false, useTimestamp = false)
}
add {
regexes = mutableListOf("fix/.*".toRegex())
incrementer = Incrementer.PATCH
stringify = stringifier(useSha = false, useTimestamp = false)
}
add {
regexes = mutableListOf(".*".toRegex())
incrementer = Incrementer.MINOR
stringify = { version ->
stringifier(
useBranch = version.isSnapshot,
useSha = false,
useTimestamp = false
)(version)
}
}
}
}
}
version = kewtVersioning.version

repositories {
mavenCentral()
mavenCentral()
}

dependencies {
implementation("org.eclipse.jgit:org.eclipse.jgit:5.12.0.202106070339-r")
implementation("org.eclipse.jgit:org.eclipse.jgit:6.10.0.202406032230-r")
}

gradlePlugin {
val kewtVersioning by plugins.creating {
id = "com.github.mfarsikov.kewt-versioning"
displayName = "Kewt versioning"
implementationClass = "com.github.mfarsikov.kewt.versioning.plugin.KewtVersioningPlugin"
}
val kewtVersioning by plugins.creating {
id = "com.github.mfarsikov.kewt-versioning"
displayName = "Kewt versioning"
implementationClass = "com.github.mfarsikov.kewt.versioning.plugin.KewtVersioningPlugin"
}
}

val functionalTestSourceSet = sourceSets.create("functionalTest") {
Expand All @@ -62,43 +62,48 @@ gradlePlugin.testSourceSets(functionalTestSourceSet)
configurations.getByName("functionalTestImplementation").extendsFrom(configurations.getByName("testImplementation"))

val functionalTest by tasks.creating(Test::class) {
testClassesDirs = functionalTestSourceSet.output.classesDirs
classpath = functionalTestSourceSet.runtimeClasspath
testClassesDirs = functionalTestSourceSet.output.classesDirs
classpath = functionalTestSourceSet.runtimeClasspath
}

val check by tasks.getting(Task::class) {
dependsOn(functionalTest)
dependsOn(functionalTest)
}

publishing {
publications {
create<MavenPublication>("maven") {
groupId = project.group as String
artifactId = project.name
version = project.version.toString()
from(components["java"])
}
publications {
create<MavenPublication>("maven") {
groupId = project.group as String
artifactId = project.name
version = project.version.toString()
from(components["java"])
}
}
}

kotlin {
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
jvmTarget = "1.8"
}
kotlin {
compilerOptions {
freeCompilerArgs.addAll("-Xjsr305=strict")
}
}

pluginBundle {
website = "https://github.com/mfarsikov/kewt-versioning"
vcsUrl = "https://github.com/mfarsikov/kewt-versioning"
description = "Gradle plugin for versioning using Git tags"
tags = listOf("git", "versioning")
gradlePlugin {
website = "https://github.com/mfarsikov/kewt-versioning"
vcsUrl = "https://github.com/mfarsikov/kewt-versioning"
plugins {
create("kewtVersioning") {
id = "com.github.mfarsikov.kewt-versioning"
description = "Gradle plugin for versioning using Git tags"
tags = listOf("git", "versioning")
implementationClass = "com.github.mfarsikov.kewt.versioning.plugin.KewtVersioningPlugin"
}
}
}
project.ext["gradle.publish.key"] = System.getenv("GRADLE_PUBLISH_KEY")
project.ext["gradle.publish.secret"] = System.getenv("GRADLE_PUBLISH_SECRET")
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 0bf3c8b

Please sign in to comment.