Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ repositories {
mavenLocal()
mavenCentral()
maven("https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven")
maven(jupyterApiTCRepo)
if (jupyterApiTCRepo.isNotBlank()) maven(jupyterApiTCRepo)
}

configurations {
Expand Down
14 changes: 7 additions & 7 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ tasks.withType<KspTask> {
}
}

val clearTestResults by tasks.creating(Delete::class) {
val clearTestResults by tasks.registering(Delete::class, fun Delete.() {
delete(layout.buildDirectory.dir("dataframes"))
delete(layout.buildDirectory.dir("korroOutputLines"))
}
})

val samplesTest = tasks.register<Test>("samplesTest") {
group = "Verification"
Expand All @@ -140,7 +140,7 @@ val samplesTest = tasks.register<Test>("samplesTest") {
sourceSets["main"].runtimeClasspath
}

val clearSamplesOutputs by tasks.creating {
val clearSamplesOutputs by tasks.registering {
group = "documentation"

doFirst {
Expand All @@ -152,11 +152,11 @@ val clearSamplesOutputs by tasks.creating {
}
}

val addSamplesToGit by tasks.creating(GitTask::class) {
val addSamplesToGit by tasks.registering(GitTask::class, fun GitTask.() {
directory = file(".")
command = "add"
args = listOf("-A", "../docs/StardustDocs/resources/snippets")
}
})

val copySamplesOutputs = tasks.register<JavaExec>("copySamplesOutputs") {
group = "documentation"
Expand All @@ -167,7 +167,7 @@ val copySamplesOutputs = tasks.register<JavaExec>("copySamplesOutputs") {
classpath = sourceSets.test.get().runtimeClasspath

doLast {
addSamplesToGit.executeCommand()
addSamplesToGit.get().executeCommand()
}
}

Expand Down Expand Up @@ -240,7 +240,7 @@ idea {
// If `changeJarTask` is run, modify all Jar tasks such that before running the Kotlin sources are set to
// the target of `processKdocMain`, and they are returned to normal afterward.
// This is usually only done when publishing
val changeJarTask by tasks.creating {
val changeJarTask by tasks.registering {
outputs.upToDateWhen { project.hasProperty("skipKodex") }
doFirst {
tasks.withType<Jar> {
Expand Down
2 changes: 1 addition & 1 deletion dataframe-csv/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ tasks.named("runKtlintCheckOverGeneratedSourcesSourceSet") {
// If `changeJarTask` is run, modify all Jar tasks such that before running the Kotlin sources are set to
// the target of `processKdocMain`, and they are returned to normal afterward.
// This is usually only done when publishing
val changeJarTask by tasks.creating {
val changeJarTask by tasks.registering {
outputs.upToDateWhen { false }
doFirst {
tasks.withType<Jar> {
Expand Down
2 changes: 1 addition & 1 deletion dataframe-openapi-generator/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ val jupyterApiTCRepo: String by project
repositories {
mavenLocal()
mavenCentral()
maven(jupyterApiTCRepo)
if (jupyterApiTCRepo.isNotBlank()) maven(jupyterApiTCRepo)
}

dependencies {
Expand Down
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,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
9 changes: 4 additions & 5 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -115,7 +114,7 @@ case "$( uname )" in #(
NONSTOP* ) nonstop=true ;;
esac

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
CLASSPATH="\\\"\\\""


# Determine the Java command to use to start the JVM.
Expand Down Expand Up @@ -206,15 +205,15 @@ fi
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

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

# Stop when "xargs" is not available.
Expand Down
4 changes: 2 additions & 2 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ goto fail
:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
set CLASSPATH=


@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
"%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" %*

:end
@rem End local scope for the variables with windows NT shell
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package org.jetbrains.dataframe.gradle
import com.google.devtools.ksp.gradle.KspTaskJvm
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.Task
import org.gradle.api.file.FileCollection
import org.gradle.api.logging.LogLevel
import org.gradle.api.tasks.TaskProvider
import org.gradle.internal.logging.services.DefaultLoggingManager
import org.gradle.kotlin.dsl.create
import org.gradle.kotlin.dsl.withType
Expand Down Expand Up @@ -37,9 +37,9 @@ class SchemaGeneratorPlugin : Plugin<Project> {
}

val generationTasks = extension.schemas.map {
createTask(target, extension, appliedPlugin, it)
registerTask(target, extension, appliedPlugin, it)
}
val generateAll = target.tasks.create("generateDataFrames") {
val generateAll = target.tasks.register("generateDataFrames") {
group = GROUP
dependsOn(*generationTasks.toTypedArray())
}
Expand All @@ -52,12 +52,12 @@ class SchemaGeneratorPlugin : Plugin<Project> {
}
}

private fun createTask(
private fun registerTask(
target: Project,
extension: SchemaGeneratorExtension,
appliedPlugin: AppliedPlugin?,
schema: Schema,
): Task {
): TaskProvider<GenerateDataSchemaTask> {
val interfaceName = getInterfaceName(schema)

fun propertyError(property: String): Nothing {
Expand Down Expand Up @@ -124,7 +124,7 @@ class SchemaGeneratorPlugin : Plugin<Project> {
val defaultPath = schema.defaultPath ?: extension.defaultPath ?: true
val delimiters = schema.withNormalizationBy ?: extension.withNormalizationBy ?: setOf('\t', ' ', '_')

return target.tasks.create("generateDataFrame$interfaceName", GenerateDataSchemaTask::class.java) {
return target.tasks.register("generateDataFrame$interfaceName", GenerateDataSchemaTask::class.java) {
(logging as? DefaultLoggingManager)?.setLevelInternal(LogLevel.QUIET)
group = GROUP
data.set(schema.data)
Expand Down
2 changes: 1 addition & 1 deletion plugins/expressions-converter/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ sourceSets {
}
}

tasks.create<JavaExec>("generateTests") {
tasks.register<JavaExec>("generateTests") {
classpath = sourceSets.test.get().runtimeClasspath
mainClass = "org.jetbrains.kotlinx.dataframe.GenerateTestsKt"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import org.jetbrains.kotlin.ir.expressions.impl.IrConstImpl
import org.jetbrains.kotlin.ir.expressions.impl.IrFunctionExpressionImpl
import org.jetbrains.kotlin.ir.expressions.impl.IrGetObjectValueImpl
import org.jetbrains.kotlin.ir.expressions.impl.IrGetValueImpl
import org.jetbrains.kotlin.ir.symbols.UnsafeDuringIrConstructionAPI
import org.jetbrains.kotlin.ir.symbols.impl.IrSimpleFunctionSymbolImpl
import org.jetbrains.kotlin.ir.symbols.impl.IrValueParameterSymbolImpl
import org.jetbrains.kotlin.ir.types.classFqName
Expand All @@ -48,6 +49,7 @@ import java.io.File

data class ContainingDeclarations(val clazz: IrClass?, val function: IrFunction?, val statementIndex: Int = 0)

@OptIn(UnsafeDuringIrConstructionAPI::class)
class ExplainerIrTransformer(val pluginContext: IrPluginContext) :
FileLoweringPass,
IrElementTransformer<ContainingDeclarations> {
Expand Down
2 changes: 1 addition & 1 deletion plugins/kotlin-dataframe/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ tasks.compileTestKotlin {
}
}

tasks.create<JavaExec>("generateTests") {
tasks.register<JavaExec>("generateTests") {
classpath = sourceSets.test.get().runtimeClasspath
mainClass = "org.jetbrains.kotlin.fir.dataframe.GenerateTestsKt"
}
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ val jupyterApiTCRepo: String by settings
dependencyResolutionManagement {
repositories {
mavenCentral()
maven(jupyterApiTCRepo)
if (jupyterApiTCRepo.isNotBlank()) maven(jupyterApiTCRepo)
}
}

Expand Down