|
| 1 | +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile |
| 2 | + |
| 3 | +plugins { |
| 4 | + // Java support |
| 5 | + id("java") |
| 6 | + // Kotlin support |
| 7 | + id("org.jetbrains.kotlin.jvm") version "1.5.31" |
| 8 | + // gradle-intellij-plugin - read more: https://github.com/JetBrains/gradle-intellij-plugin |
| 9 | + id("org.jetbrains.intellij") version "1.1.6" |
| 10 | +} |
| 11 | + |
| 12 | +group = "com.emberjs" |
| 13 | +version = "2021.2.1" |
| 14 | + |
| 15 | +// Configure project's dependencies |
| 16 | +repositories { |
| 17 | + mavenCentral() |
| 18 | +} |
| 19 | +dependencies { |
| 20 | + testImplementation("org.assertj:assertj-core:3.21.0") |
| 21 | +} |
| 22 | + |
| 23 | +// Configure gradle-intellij-plugin plugin. |
| 24 | +// Read more: https://github.com/JetBrains/gradle-intellij-plugin |
| 25 | +intellij { |
| 26 | + pluginName.set("Ember.js") |
| 27 | + |
| 28 | + // see https://www.jetbrains.com/intellij-repository/releases/ |
| 29 | + // and https://www.jetbrains.com/intellij-repository/snapshots/ |
| 30 | + version.set("2021.2") |
| 31 | + type.set("IU") |
| 32 | + |
| 33 | + downloadSources.set(!System.getenv().containsKey("CI")) |
| 34 | + updateSinceUntilBuild.set(true) |
| 35 | + |
| 36 | + // Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html |
| 37 | + // Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22 |
| 38 | + // |
| 39 | + // com.dmarcotte.handlebars: see https://plugins.jetbrains.com/plugin/6884-handlebars-mustache/versions |
| 40 | + plugins.set(listOf("JavaScriptLanguage", "CSS", "yaml", "com.dmarcotte.handlebars:212.4746.2")) |
| 41 | + |
| 42 | + sandboxDir.set(project.rootDir.canonicalPath + "/.sandbox") |
| 43 | +} |
| 44 | + |
| 45 | +tasks { |
| 46 | + // Set the compatibility versions to 1.8 |
| 47 | + withType<JavaCompile> { |
| 48 | + sourceCompatibility = "1.8" |
| 49 | + targetCompatibility = "1.8" |
| 50 | + } |
| 51 | + withType<KotlinCompile> { |
| 52 | + kotlinOptions.jvmTarget = "1.8" |
| 53 | + } |
| 54 | + |
| 55 | + publishPlugin { |
| 56 | + token.set(System.getenv("ORG_GRADLE_PROJECT_intellijPublishToken")) |
| 57 | + } |
| 58 | +} |
0 commit comments