-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updates to work with 221.* and convert gradle scripts to kts #58
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## [1.0.11] | ||
### Added | ||
- Add support for 213* / 2021.3 version of IDEA #56 |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
import org.jetbrains.changelog.markdownToHTML | ||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | ||
import org.jlleitschuh.gradle.ktlint.KtlintExtension | ||
|
||
fun properties(key: String) = project.findProperty(key).toString() | ||
|
||
plugins { | ||
id("java") | ||
id("org.jetbrains.kotlin.jvm") version "1.6.10" | ||
id("org.jetbrains.intellij") version "1.4.0" | ||
id("org.jetbrains.changelog") version "1.3.1" | ||
id("org.jlleitschuh.gradle.ktlint") version "10.2.1" | ||
} | ||
|
||
group = properties("pluginGroup") | ||
version = properties("pluginVersion") | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
intellij { | ||
pluginName.set(properties("pluginName")) | ||
version.set(properties("platformVersion")) | ||
type.set(properties("platformType")) | ||
plugins.set(properties("platformPlugins").split(',').map(String::trim).filter(String::isNotEmpty)) | ||
} | ||
|
||
changelog { | ||
version.set(properties("pluginVersion")) | ||
groups.set(emptyList()) | ||
} | ||
|
||
configure<KtlintExtension> { | ||
filter { | ||
include("src/**/*.kt") | ||
} | ||
} | ||
|
||
dependencies { | ||
testImplementation(group = "junit", name = "junit", version = "4.13.1") | ||
} | ||
|
||
tasks { | ||
// Set the JVM compatibility versions | ||
properties("javaVersion").let { | ||
withType<JavaCompile> { | ||
sourceCompatibility = it | ||
targetCompatibility = it | ||
} | ||
withType<KotlinCompile> { | ||
kotlinOptions.jvmTarget = it | ||
} | ||
} | ||
|
||
wrapper { | ||
gradleVersion = properties("gradleVersion") | ||
} | ||
|
||
patchPluginXml { | ||
version.set(properties("pluginVersion")) | ||
sinceBuild.set(properties("pluginSinceBuild")) | ||
untilBuild.set(properties("pluginUntilBuild")) | ||
|
||
// Extract the <!-- Plugin description --> section from README.md and provide for the plugin's manifest | ||
pluginDescription.set( | ||
projectDir.resolve("README.md").readText().lines().run { | ||
val start = "<!-- Plugin description -->" | ||
val end = "<!-- Plugin description end -->" | ||
|
||
if (!containsAll(listOf(start, end))) { | ||
throw GradleException("Plugin description section not found in README.md:\n$start ... $end") | ||
} | ||
subList(indexOf(start) + 1, indexOf(end)) | ||
}.joinToString("\n") | ||
.run { markdownToHTML(this) } | ||
.plus( | ||
"<a target=\"_blank\" href=\"https://user-images.githubusercontent.com/8841470/59397528-e61a4380-8dc7-11e9-9684-d82d225316fe.gif\">" + | ||
"<img src=\"https://user-images.githubusercontent.com/8841470/59397528-e61a4380-8dc7-11e9-9684-d82d225316fe.gif\" alt=\"fill-class\" style=\"max-width:100%;\">" + | ||
"</a></p>" | ||
) | ||
) | ||
|
||
// Get the latest available change notes from the changelog file | ||
changeNotes.set( | ||
provider { | ||
changelog.run { | ||
getOrNull(properties("pluginVersion")) ?: getLatest() | ||
}.toHTML() | ||
} | ||
) | ||
} | ||
|
||
// Configure UI tests plugin | ||
// Read more: https://github.com/JetBrains/intellij-ui-test-robot | ||
runIdeForUiTests { | ||
systemProperty("robot-server.port", "8082") | ||
systemProperty("ide.mac.message.dialogs.as.sheets", "false") | ||
systemProperty("jb.privacy.policy.text", "<!--999.999-->") | ||
systemProperty("jb.consents.confirmation.enabled", "false") | ||
} | ||
|
||
publishPlugin { | ||
dependsOn("patchChangelog") | ||
token.set(System.getenv("TOKEN")) | ||
channels.set(listOf(properties("pluginVersion").split('-').getOrElse(1) { "default" }.split('.').first())) | ||
} | ||
} | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
pluginGroup = com.github.suusan2go.kotlin-fill-class | ||
pluginName = kotlin-fill-class | ||
pluginVersion = 1.0.12 | ||
pluginSinceBuild = 191.8026.42 | ||
pluginUntilBuild = 221.* | ||
platformType = IC | ||
platformVersion = 2021.1.3 | ||
platformPlugins = com.intellij.java, org.jetbrains.kotlin | ||
javaVersion = 11 | ||
gradleVersion = 7.4 | ||
|
||
# Opt-out flag for bundling Kotlin standard library. | ||
# See https://plugins.jetbrains.com/docs/intellij/kotlin.html#kotlin-standard-library for details. | ||
# suppress inspection "UnusedProperty" | ||
kotlin.stdlib.default.dependency = false |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.1-all.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
/* | ||
* This file was generated by the Gradle 'init' task. | ||
* This file was generated by the Gradle "init" task. | ||
* | ||
* The settings file is used to specify which projects to include in your build. | ||
* | ||
* Detailed information about configuring a multi-project build in Gradle can be found | ||
* in the user guide at https://docs.gradle.org/4.8.1/userguide/multi_project_builds.html | ||
*/ | ||
|
||
rootProject.name = 'kotlin-fill-class' | ||
|
||
rootProject.name = "kotlin-fill-class" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not opposed to adding these things, but can you make PRs into two or three separated PRs?
changelog.md
looks useful, but I'm not that interested in generating descriptions from README.