-
Notifications
You must be signed in to change notification settings - Fork 11
Convert Gradle build config to Kotlin #100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
aSemy
wants to merge
10
commits into
qoomon:master
Choose a base branch
from
aSemy:feat/gradle_kts
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
546a034
gradle 7.5.1
aSemy b05d6ad
enable Gradle build & config cache
aSemy a56e77e
rename build files to .kts
aSemy 7bc7f0c
convert build files to .kts
aSemy bf49681
re-add test-logger and ben-manes.versions
aSemy f9c728e
fix plugin ID
aSemy bdaa651
Merge remote-tracking branch 'origin/master' into feat/gradle_kts
aSemy 287a788
bump gradle 7.6
aSemy 5583935
Merge remote-tracking branch 'origin/master' into feat/gradle_kts
aSemy 3f486ca
rm unnecessary cast (thanks to Gradle 7.6 update)
aSemy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.7" | ||
|
||
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 { | ||
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 | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
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.6-bin.zip | ||
networkTimeout=10000 | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() | ||
} | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.