Skip to content
Open
Show file tree
Hide file tree
Changes from 6 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
53 changes: 0 additions & 53 deletions build.gradle

This file was deleted.

72 changes: 72 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
plugins {
`kotlin-dsl`
`java-gradle-plugin`

kotlin("jvm") version embeddedKotlinVersion

id("com.gradle.plugin-publish") version "1.0.0"
`maven-publish` // for local testing only

id("com.github.ben-manes.versions") version "0.43.0"
id("com.adarshr.test-logger") version "3.2.0"

idea
}

group = "me.qoomon"
version = "6.3.5"

dependencies {
implementation("org.eclipse.jgit:org.eclipse.jgit:6.3.0.202209071007-r")
implementation("org.apache.maven:maven-artifact:3.8.6")
implementation("org.apache.commons:commons-configuration2:2.8.0")

testImplementation("org.junit.jupiter:junit-jupiter-api:5.9.1")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.9.1")
testImplementation("org.assertj:assertj-core:3.23.1")
}

tasks.withType<Test>().configureEach {
useJUnitPlatform()
}

gradlePlugin {
plugins.create("gitVersioning") {
id = "me.qoomon.git-versioning"
displayName = "Git Versioning Plugin"
description =
"This extension will adjust the project version, based on current git branch or tag."
implementationClass = "me.qoomon.gradle.gitversioning.GitVersioningPlugin"
}
}

pluginBundle {
website = "https://github.com/qoomon/gradle-git-versioning-plugin"
vcsUrl = "https://github.com/qoomon/gradle-git-versioning-plugin.git"
tags = listOf("git", "versioning", "version", "commit", "branch", "tag", "generated")
}

val projectJvmTarget = "11"

kotlin {
jvmToolchain {
(this as JavaToolchainSpec).languageVersion.set(JavaLanguageVersion.of(projectJvmTarget))
}
}

kotlinDslPluginOptions {
jvmTarget.set(projectJvmTarget)
}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions {
jvmTarget = projectJvmTarget
}
}

idea {
module {
isDownloadSources = true
isDownloadJavadoc = false
}
}
8 changes: 8 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8

org.gradle.caching=true
# https://github.com/gradle/gradle/issues/20416
systemProp.org.gradle.kotlin.dsl.precompiled.accessors.strict=true

org.gradle.unsafe.configuration-cache=true
org.gradle.unsafe.configuration-cache-problems=warn
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
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.3.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
6 changes: 6 additions & 0 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,12 @@ set -- \
org.gradle.wrapper.GradleWrapperMain \
"$@"

# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi

# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
Expand Down
14 changes: 8 additions & 6 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
@rem limitations under the License.
@rem

@if "%DEBUG%" == "" @echo off
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
Expand All @@ -25,7 +25,7 @@
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
if "%DIRNAME%"=="" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

Expand All @@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Expand Down Expand Up @@ -75,13 +75,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
if %ERRORLEVEL% equ 0 goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%

:mainEnd
if "%OS%"=="Windows_NT" endlocal
Expand Down
1 change: 0 additions & 1 deletion settings.gradle

This file was deleted.

16 changes: 16 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
rootProject.name = "gradle-git-versioning-plugin"

enableFeaturePreview("STABLE_CONFIGURATION_CACHE") // https://docs.gradle.org/7.5.1/userguide/configuration_cache.html#config_cache:stable

dependencyResolutionManagement {
repositories {
mavenCentral()
}

pluginManagement {
repositories {
gradlePluginPortal()
mavenCentral()
}
}
}