Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
14 changes: 7 additions & 7 deletions platform/jewel/buildSrc/src/main/kotlin/jewel.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import com.ncorti.ktfmt.gradle.tasks.KtfmtBaseTask
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jmailen.gradle.kotlinter.tasks.FormatTask
import org.jmailen.gradle.kotlinter.tasks.LintTask

plugins {
id("jewel-linting")
Expand Down Expand Up @@ -56,17 +58,15 @@ kotlin {
}

tasks {
// We need to use relative paths for patterns.
// Exclude does not work; this is how the Kotlinter plugin docs recommend doing it, and it works...
val buildDir = layout.buildDirectory.asFile.get().relativeTo(project.projectDir).path
detektMain { source = (source - fileTree(buildDir)).asFileTree }
detektMain { exclude { it.file.path.contains(buildDir) } }

formatKotlinMain { source = (source - fileTree(buildDir)).asFileTree }
withType<KtfmtBaseTask> { exclude { it.file.path.contains(buildDir) } }

withType<KtfmtBaseTask> { source = (source - fileTree(buildDir)).asFileTree }
withType<FormatTask> { exclude { it.file.path.contains(buildDir) } }

lintKotlinMain {
source = (source - fileTree(buildDir)).asFileTree
withType<LintTask> {
exclude { it.file.path.contains(buildDir) }

reports = provider {
mapOf(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package org.jetbrains.jewel.buildlogic.metalava

import javax.inject.Inject
import org.gradle.api.DefaultTask
import org.gradle.api.GradleException
import org.gradle.api.file.ConfigurableFileCollection
import org.gradle.api.file.RegularFileProperty
import org.gradle.api.provider.Property
Expand Down
2 changes: 1 addition & 1 deletion platform/jewel/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ junitJupiter = "5.13.4"
junitPlatform = "1.13.4"
kotlin = "2.1.20"
kotlinpoet = "2.1.0"
kotlinterGradlePlugin = "5.0.1"
kotlinterGradlePlugin = "5.2.0"
kotlinxSerialization = "1.8.0"
ktfmtGradlePlugin = "0.23.0"
metalava = "1.0.0-alpha13"
Expand Down
Binary file modified platform/jewel/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion platform/jewel/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.14.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
5 changes: 1 addition & 4 deletions platform/jewel/gradlew
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

#
# Copyright © 2015-2021 the original authors.
# Copyright © 2015 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -114,7 +114,6 @@ case "$( uname )" in #(
NONSTOP* ) nonstop=true ;;
esac

CLASSPATH="\\\"\\\""


# Determine the Java command to use to start the JVM.
Expand Down Expand Up @@ -172,7 +171,6 @@ fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )

JAVACMD=$( cygpath --unix "$JAVACMD" )

Expand Down Expand Up @@ -212,7 +210,6 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
"$@"

Expand Down
3 changes: 1 addition & 2 deletions platform/jewel/gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,10 @@ goto fail
:execute
@rem Setup the command line

set CLASSPATH=


@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*

:end
@rem End local scope for the variables with windows NT shell
Expand Down
5 changes: 3 additions & 2 deletions platform/jewel/int-ui/int-ui-standalone/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import io.gitlab.arturbosch.detekt.Detekt
import org.jetbrains.jewel.buildlogic.metalava.GenerateMetalavaApiTask
import org.jetbrains.jewel.buildlogic.theme.IntelliJThemeGeneratorTask
import org.jmailen.gradle.kotlinter.tasks.LintTask

plugins {
jewel
Expand Down Expand Up @@ -41,7 +42,7 @@ tasks {
}

val generateThemes by
register("generateThemes") {
register<Task>("generateThemes") {
description = "Updates the ThemeDescription dumps and reformats them."
dependsOn(themeGeneratorTasks)
dependsOn(ktfmtFormatMain)
Expand All @@ -54,7 +55,7 @@ tasks {
mustRunAfter(ktfmtFormatMain)
}

lintKotlinMain {
withType<LintTask> {
mustRunAfter(generateThemes)
mustRunAfter(ktfmtFormatMain)
}
Expand Down