-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f57a6ab
commit 36d81c6
Showing
9 changed files
with
215 additions
and
164 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,157 @@ | ||
import org.gradle.api.tasks.testing.logging.TestExceptionFormat | ||
import org.jetbrains.changelog.Changelog | ||
import org.jetbrains.changelog.date | ||
import org.jetbrains.intellij.platform.gradle.TestFrameworkType | ||
|
||
plugins { | ||
|
||
id("java") | ||
alias(libs.plugins.kotlin) | ||
id("org.jetbrains.intellij.platform") | ||
alias(libs.plugins.changelog) | ||
alias(libs.plugins.jvmwrapper) | ||
} | ||
|
||
group = providers.gradleProperty("thisPluginGroup").get() | ||
version = providers.gradleProperty("thisPluginVersion").get() | ||
|
||
// Set the JVM language level used to build the project. | ||
kotlin { | ||
jvmToolchain(17) | ||
} | ||
|
||
repositories { | ||
maven { setUrl("https://cache-redirector.jetbrains.com/maven-central") } | ||
|
||
intellijPlatform { | ||
defaultRepositories() | ||
jetbrainsRuntime() | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation("com.google.code.gson:gson:2.10") | ||
//noinspection GradlePackageUpdate | ||
implementation("com.microsoft.azure:applicationinsights-core:2.6.4") // HACK: we need to stay on this older version of AppInsights for as long as possible | ||
|
||
intellijPlatform { | ||
val platformVer: String = providers.gradleProperty("platformVersion").get() | ||
rider(platformVer) | ||
jetbrainsRuntime() | ||
pluginVerifier() | ||
zipSigner() | ||
instrumentationTools() | ||
|
||
testFramework(TestFrameworkType.Bundled) | ||
} | ||
} | ||
|
||
intellijPlatform { | ||
instrumentCode = true | ||
pluginConfiguration { | ||
val plugInVer: String = providers.gradleProperty("thisPluginVersion").get() | ||
version = plugInVer | ||
ideaVersion { | ||
sinceBuild = providers.gradleProperty("pluginSinceBuild") | ||
untilBuild = providers.gradleProperty("pluginUntilBuild") | ||
} | ||
} | ||
pluginVerification { | ||
ides { | ||
recommended() | ||
} | ||
} | ||
} | ||
|
||
changelog { | ||
val plugInVer: String = providers.gradleProperty("thisPluginVersion").get() | ||
version.set(plugInVer) | ||
path.set(file("CHANGELOG.md").canonicalPath) | ||
header.set(provider { "[${version.get()}] - ${date("yyyy-MM-dd")}" }) | ||
headerParserRegex.set("""(\d+\.\d+\.\d+[\-\w]*)""".toRegex()) | ||
introduction.set( | ||
""" | ||
All notable changes to this project are documented in this file. | ||
> The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
""".trimIndent() | ||
) | ||
itemPrefix.set("-") | ||
keepUnreleasedSection.set(true) | ||
unreleasedTerm.set("[Unreleased]") | ||
groups.set(listOf("Notes", "Added", "Changed", "Deprecated", "Removed", "Fixed", "Security")) | ||
lineSeparator.set("\n") | ||
combinePreReleases.set(true) | ||
} | ||
|
||
tasks { | ||
|
||
wrapper { | ||
val gradleVer: String = providers.gradleProperty("gradleVersion").get() | ||
gradleVersion = gradleVer | ||
} | ||
|
||
publishPlugin { | ||
dependsOn("patchChangelog") | ||
val plugInVer: String = providers.gradleProperty("thisPluginVersion").get() | ||
val items: String = if (plugInVer.split("-").size > 1) | ||
plugInVer.split("-")[1] | ||
else | ||
"default" | ||
token.set(System.getenv("ORG_GRADLE_PROJECT_intellijPublishToken")) | ||
channels.set(listOf(items)) | ||
} | ||
|
||
patchPluginXml { | ||
val plugInVer: String = providers.gradleProperty("thisPluginVersion").get() | ||
val versionExists = changelog.has(plugInVer) | ||
if (versionExists) { | ||
changeNotes.set(provider { | ||
changelog.renderItem( | ||
changelog | ||
.get(plugInVer) | ||
.withHeader(false) | ||
.withEmptySections(false), | ||
Changelog.OutputType.HTML | ||
) | ||
} | ||
) | ||
} else { | ||
changeNotes.set(provider { | ||
changelog.renderItem( | ||
changelog | ||
.getUnreleased() | ||
.withHeader(false) | ||
.withEmptySections(false), | ||
Changelog.OutputType.HTML | ||
) | ||
} | ||
) | ||
} | ||
} | ||
|
||
test { | ||
dependencies { | ||
testImplementation("org.junit.jupiter:junit-jupiter:5.9.0") | ||
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.9.0") | ||
testImplementation("org.mockito:mockito-core:4.8.0") | ||
testImplementation("org.testng:testng:7.7.0") | ||
testRuntimeOnly("org.junit.support:testng-engine:1.0.4") | ||
} | ||
|
||
systemProperty("LOCAL_ENV_RUN", "true") //For use with 'BaseTestWithSolution' and TestNG | ||
useJUnitPlatform() | ||
minHeapSize = "512m" | ||
maxHeapSize = "1024m" | ||
testLogging { | ||
showStandardStreams = true | ||
exceptionFormat = TestExceptionFormat.FULL | ||
} | ||
} | ||
|
||
runIde { | ||
autoReload = false | ||
maxHeapSize = "2G" | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[versions] | ||
kotlin = "1.9.25" # https://plugins.jetbrains.com/docs/intellij/using-kotlin.html#kotlin-standard-library | ||
changelog = "2.2.1" | ||
jvmwrapper = "0.14.0" | ||
|
||
[libraries] | ||
kotlin = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib", version.ref = "kotlin" } | ||
|
||
[plugins] | ||
changelog = { id = "org.jetbrains.changelog", version.ref = "changelog" } | ||
kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } | ||
jvmwrapper = { id = "me.filippov.gradle.jvm.wrapper", version.ref = "jvmwrapper" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip | ||
distributionUrl=https\://cache-redirector.jetbrains.com/services.gradle.org/distributions/gradle-8.10.2-bin.zip | ||
networkTimeout=10000 | ||
validateDistributionUrl=true | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
pluginManagement { | ||
val intellijPluginVersion: String by settings | ||
|
||
plugins { | ||
id("org.jetbrains.intellij.platform").version(intellijPluginVersion) // so that we can read the version from gradle.properties | ||
} | ||
|
||
repositories { | ||
maven { setUrl("https://cache-redirector.jetbrains.com/plugins.gradle.org") } | ||
|
||
} | ||
|
||
resolutionStrategy { | ||
eachPlugin { | ||
// Gradle has to map a plugin dependency to Maven coordinates - '{groupId}:{artifactId}:{version}'. It tries | ||
// to do use '{plugin.id}:{plugin.id}.gradle.plugin:version'. | ||
// This doesn't work for rdgen, so we provide some help | ||
if (requested.id.id == "com.jetbrains.rdgen") { | ||
useModule("com.jetbrains.rd:rd-gen:${requested.version}") | ||
} | ||
} | ||
} | ||
} | ||
|
||
rootProject.name = "automate" |
Oops, something went wrong.