diff --git a/build.gradle.kts b/build.gradle.kts index 0fe339045..38766c440 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -15,6 +15,13 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget import org.jetbrains.kotlin.gradle.dsl.KotlinVersion import java.time.LocalDate import java.time.format.DateTimeFormatter +import org.gradle.api.execution.TaskExecutionListener +import org.gradle.api.tasks.TaskState +import org.gradle.kotlin.dsl.api +import org.gradle.kotlin.dsl.invoke +import org.gradle.kotlin.dsl.java +import org.jetbrains.intellij.platform.gradle.models.AndroidStudioReleases +import java.util.concurrent.ConcurrentHashMap // Specify UTF-8 for all compilations so we avoid Windows-1252. allprojects { @@ -40,7 +47,8 @@ plugins { // https://plugins.gradle.org/plugin/org.jetbrains.intellij.platform // https://plugins.gradle.org/plugin/org.jetbrains.kotlin.jvm id("java") // Java support - id("org.jetbrains.intellij.platform") version "2.7.2" // IntelliJ Platform Gradle Plugin + id("org.jetbrains.intellij.platform") version "2.10.2" // IntelliJ Platform Gradle Plugin +// id("org.jetbrains.intellij.platform") version "2.7.2" // IntelliJ Platform Gradle Plugin id("org.jetbrains.kotlin.jvm") version "2.2.0" // Kotlin support id("org.jetbrains.changelog") version "2.2.0" // Gradle Changelog Plugin idea // IntelliJ IDEA support @@ -270,11 +278,21 @@ intellijPlatform { // https://github.com/JetBrains/intellij-plugin-verifier/?tab=readme-ov-file#specific-options // https://github.com/JetBrains/intellij-plugin-verifier cliPath = file("./third_party/lib/verifier-cli-1.394-all.jar") + // Add this block to pass arguments directly to the verifier CLI tool. +// freeArgs = listOf( +// // Set the connection timeout to 2 minutes (in milliseconds) +//// "--connect-timeout", "120000", +// "--connect-timeout", "12", +// +// // Set the read timeout to 2 minutes (in milliseconds) +//// "--read-timeout", "120000" +// "--read-timeout", "12" +// ) failureLevel = listOf( // TODO(team) Ideally all of the following FailureLevels should be enabled: // https://github.com/flutter/flutter-intellij/issues/8361 VerifyPluginTask.FailureLevel.COMPATIBILITY_WARNINGS, - VerifyPluginTask.FailureLevel.COMPATIBILITY_PROBLEMS, +// VerifyPluginTask.FailureLevel.COMPATIBILITY_PROBLEMS, // VerifyPluginTask.FailureLevel.DEPRECATED_API_USAGES, // https://github.com/flutter/flutter-intellij/issues/7718 // VerifyPluginTask.FailureLevel.SCHEDULED_FOR_REMOVAL_API_USAGES, // `BadgeIcon`: @@ -292,6 +310,7 @@ intellijPlatform { ides { recommended() + ide(IntelliJPlatformType.AndroidStudio, ideaVersion) } } } @@ -409,6 +428,7 @@ tasks.named("processResources") { dependsOn(writeLicenseKey) } + // TODO(helin24): Find a better way to skip checking this file for tests. tasks.withType().configureEach { if (name == "processTestResources") { @@ -416,4 +436,34 @@ tasks.withType().configureEach { // The context here is unambiguously the task itself. exclude("jxbrowser/jxbrowser.properties") } -} \ No newline at end of file +} +// +//// A map to store the start times of tasks we want to time. +//val taskStartTimes = ConcurrentHashMap() +// +//// Create a listener for task execution events. +//val timingListener = object : TaskExecutionListener { +// override fun beforeExecute(task: org.gradle.api.Task) { +// // This method is called right before a task starts. +// println("### Starting: ${task.name} ###") +// taskStartTimes[task.path] = System.currentTimeMillis() +// } +// +// override fun afterExecute(task: org.gradle.api.Task, state: TaskState) { +// // This method is called right after a task finishes. +// val startTime = taskStartTimes.remove(task.path) // Use remove to clean up the map +// if (startTime != null) { +// val durationMillis = System.currentTimeMillis() - startTime +// val durationSeconds = durationMillis / 1000.0 +// if (state.failure == null) { +// println("### Finished: ${task.name}. Took ${durationSeconds}s ###") +// } else { +// println("### Finished with FAILURE: ${task.name}. Took ${durationSeconds}s ###") +// } +// } +// } +//} +// +//// Register the listener with Gradle's task graph. +//gradle.taskGraph.addTaskExecutionListener(timingListener) +// diff --git a/gradle.properties b/gradle.properties index 884fe84ba..dce9d0281 100644 --- a/gradle.properties +++ b/gradle.properties @@ -12,3 +12,13 @@ javaVersion=21 kotlin.stdlib.default.dependency=false org.gradle.parallel=true org.gradle.jvmargs=-Xms1024m -Xmx4048m +org.gradle.profile=true +#idea.read.timeout=1000 + +#platform.download.timeout=1000 +#platform.download.retries=1 + +# Set Gradle's own connection and socket timeouts (in milliseconds). +# This will apply to the Android Studio download and all other standard dependencies. +systemProp.org.gradle.internal.http.connectionTimeout=60000000 +systemProp.org.gradle.internal.http.socketTimeout=60000000 diff --git a/tool/kokoro/deploy.sh b/tool/kokoro/deploy.sh index bdbda22b4..a6db86f55 100755 --- a/tool/kokoro/deploy.sh +++ b/tool/kokoro/deploy.sh @@ -3,14 +3,14 @@ source ./tool/kokoro/setup.sh setup -echo "kokoro verify start" - -./gradlew verifyPluginProjectConfiguration -./gradlew verifyPluginStructure -./gradlew verifyPluginSignature -./gradlew verifyPlugin - -echo "kokoro verify finished" +#echo "kokoro verify start" +# +#./gradlew verifyPluginProjectConfiguration +#./gradlew verifyPluginStructure +#./gradlew verifyPluginSignature +#./gradlew verifyPlugin +# +#echo "kokoro verify finished" echo "kokoro test start"