Skip to content

Commit

Permalink
Add a runLocalIde task that uses the apolloIntellijPlugin.ideDir prop…
Browse files Browse the repository at this point in the history
…erty
  • Loading branch information
BoD committed Apr 19, 2024
1 parent aec189d commit a57a3ff
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
5 changes: 3 additions & 2 deletions .idea/runConfigurations/Run_IntelliJ_plugin.xml

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

17 changes: 9 additions & 8 deletions intellij-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
import org.jetbrains.changelog.markdownToHTML
import org.jetbrains.intellij.platform.gradle.extensions.TestFrameworkType
import org.jetbrains.intellij.platform.gradle.tasks.RunIdeTask
import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask
import java.net.URL
import java.text.SimpleDateFormat
Expand Down Expand Up @@ -55,24 +56,24 @@ tasks {
}
}

runIde {
withType<RunIdeTask> {
// Enables debug logging for the plugin
systemProperty("idea.log.debug.categories", "Apollo")

// Disable hiding frequent exceptions in logs (annoying for debugging). See com.intellij.idea.IdeaLogger.
systemProperty("idea.logger.exception.expiration.minutes", "0")

// Use a custom IntelliJ installation. Set this property in your local ~/.gradle/gradle.properties file.
// (for AS, it should be something like '/Applications/Android Studio.app/Contents')
// See https://plugins.jetbrains.com/docs/intellij/android-studio.html#configuring-the-plugin-gradle-build-script
if (project.hasProperty("apolloIntellijPlugin.ideDir")) {
localPath.set(file(project.property("apolloIntellijPlugin.ideDir")!!))
}

// Uncomment to disable internal mode - see https://plugins.jetbrains.com/docs/intellij/enabling-internal.html
// systemProperty("idea.is.internal", "false")
}

val runLocalIde by registering(RunIdeTask::class) {
// Use a custom IJ/AS installation. Set this property in your local ~/.gradle/gradle.properties file.
// (for AS, it should be something like '/Applications/Android Studio.app/Contents')
// See https://plugins.jetbrains.com/docs/intellij/android-studio.html#configuring-the-plugin-gradle-build-script
localPath = providers.gradleProperty("apolloIntellijPlugin.ideDir").orNull?.let { file(it) }
}

// Log tests
withType<AbstractTestTask> {
testLogging {
Expand Down

0 comments on commit a57a3ff

Please sign in to comment.