Skip to content

Commit

Permalink
1.6.0: Update to Gradle 8.11 and Kotlin 2.0.20.
Browse files Browse the repository at this point in the history
  • Loading branch information
gdude2002 committed Nov 28, 2024
1 parent cc7f303 commit 54c6779
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

This repository contains Gradle plugins intended for use with Kord Extensions.

**All plugins require Gradle 8.11 or later.**

# Contents

- `docker/` - Docker Gradle plugin for Dockerfile generation.
Expand Down
4 changes: 2 additions & 2 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ repositories {
}

dependencies {
implementation(kotlin("gradle-plugin", version = "1.9.23"))
implementation(kotlin("serialization", version = "1.9.23"))
implementation(kotlin("gradle-plugin", version = "2.0.20"))
implementation(kotlin("serialization", version = "2.0.20"))

implementation("dev.yumi", "yumi-gradle-licenser", "1.2.0")
implementation("io.gitlab.arturbosch.detekt", "detekt-gradle-plugin", "1.23.6")
Expand Down
5 changes: 5 additions & 0 deletions changes/1.6.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Gradle Plugins 1.6.0

This version updates all Gradle plugins to Gradle 8.11 and Kotlin 2.0.20.

We no longer support older versions of Gradle.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ kotlin.incremental=true
org.gradle.jvmargs=-XX:MaxMetaspaceSize=1024m
org.gradle.parallel=true

projectVersion=1.5.8
projectVersion=1.6.0
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
1 change: 1 addition & 0 deletions kordex/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
`kotlin-dsl`
plugin

val env = System.getenv()

if (env.contains("GITHUB_ACTIONS") && !env.contains("NO_SIGNING")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,10 @@ import javax.inject.Inject

@Suppress("UnstableApiUsage")
class KordExPlugin @Inject constructor(
problems: Problems,
val problems: Problems,
val dependencies: DependencyFactory,
val providers: ProviderFactory,
) : Plugin<Project> {
val problemReporter = problems.forNamespace("dev.kordex")

@Suppress("UnnecessaryParentheses")
override fun apply(target: Project) {
val extension = target.extensions.create<KordExExtension>("kordEx").apply {
Expand All @@ -55,7 +53,7 @@ class KordExPlugin @Inject constructor(

KspPluginHelper.apply(target)

target.checkTask(extension, versionsProvider, problemReporter)
target.checkTask(extension, versionsProvider, problems.reporter)

target.configurations.all {
dependencies.addAllLater(
Expand Down Expand Up @@ -120,15 +118,15 @@ class KordExPlugin @Inject constructor(
val versions = versionsProvider.get()

if (extension.hasBot && extension.hasPlugin) {
problemReporter.throwing {
problems.reporter.throwing {
withException(
RuntimeException(
"Project is both bot and plugin - if you need both in the same project, split them into " +
"separate Gradle subprojects"
)
)

id("both-bot-and-plugin", "Project is both bot and plugin")
id("dev.kordex.gradle.plugins.kordex.both-bot-and-plugin", "Project is both bot and plugin")
details("Project ${target.name} cannot be both a bot and a plugin")
solution("If you need both in the same project, split them into separate Gradle subprojects")
severity(Severity.ERROR)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ fun Project.checkTask(
)

problemReporter.reporting {
id("kotlin-version", "Incompatible Kotlin plugin found")
id("dev.kordex.gradle.plugins.kordex.kotlin-version", "Incompatible Kotlin plugin found")

details(
"Incompatible Kotlin plugin found - Kord Extensions version " +
Expand All @@ -106,7 +106,10 @@ fun Project.checkTask(
)
)

id("kotlin-version", "Incompatible Kotlin plugin version found")
id(
"dev.kordex.gradle.plugins.kordex.kotlin-version",
"Incompatible Kotlin plugin version found"
)

details(
"Incompatible Kotlin plugin found - Kord Extensions version " +
Expand Down
2 changes: 1 addition & 1 deletion testModule/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
2 changes: 1 addition & 1 deletion testModule/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pluginManagement {
plugins {
val pluginVersion = "1.5.8"
val pluginVersion = "1.6.0"

kotlin("jvm") version "2.0.21"

Expand Down

0 comments on commit 54c6779

Please sign in to comment.