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
56 changes: 53 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
Expand Down Expand Up @@ -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`:
Expand All @@ -292,6 +310,7 @@ intellijPlatform {

ides {
recommended()
ide(IntelliJPlatformType.AndroidStudio, ideaVersion)
}
}
}
Expand Down Expand Up @@ -409,11 +428,42 @@ tasks.named("processResources") {
dependsOn(writeLicenseKey)
}


// TODO(helin24): Find a better way to skip checking this file for tests.
tasks.withType<ProcessResources>().configureEach {
if (name == "processTestResources") {
// This block will only execute for the 'processTestResources' task.
// The context here is unambiguously the task itself.
exclude("jxbrowser/jxbrowser.properties")
}
}
}
//
//// A map to store the start times of tasks we want to time.
//val taskStartTimes = ConcurrentHashMap<String, Long>()
//
//// 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)
//
10 changes: 10 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
16 changes: 8 additions & 8 deletions tool/kokoro/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down