backport: 15.0.2
This commit is contained in:
parent
b8b10feb07
commit
2118e2a518
4 changed files with 73 additions and 11 deletions
|
@ -17,6 +17,13 @@ Changelog structure reference:
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [15.0.2]
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Zig
|
||||||
|
- Autocomplete not working when the caret is placed right after a "("
|
||||||
|
|
||||||
## [15.0.1]
|
## [15.0.1]
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
|
@ -1,13 +1,16 @@
|
||||||
import groovy.xml.XmlParser
|
import groovy.xml.XmlParser
|
||||||
|
import groovy.xml.XmlSlurper
|
||||||
import org.jetbrains.changelog.Changelog
|
import org.jetbrains.changelog.Changelog
|
||||||
import org.jetbrains.changelog.markdownToHTML
|
import org.jetbrains.changelog.markdownToHTML
|
||||||
import org.jetbrains.intellij.tasks.PatchPluginXmlTask
|
import org.jetbrains.intellij.tasks.PatchPluginXmlTask
|
||||||
|
import org.jetbrains.intellij.tasks.PublishPluginTask
|
||||||
|
|
||||||
fun properties(key: String) = providers.gradleProperty(key)
|
fun properties(key: String) = providers.gradleProperty(key)
|
||||||
fun environment(key: String) = providers.environmentVariable(key)
|
fun environment(key: String) = providers.environmentVariable(key)
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("java") // Java support
|
id("java") // Java support
|
||||||
|
`maven-publish`
|
||||||
id("java-library")
|
id("java-library")
|
||||||
id("org.jetbrains.intellij") version("1.17.3")
|
id("org.jetbrains.intellij") version("1.17.3")
|
||||||
id("org.jetbrains.changelog") version("2.2.0")
|
id("org.jetbrains.changelog") version("2.2.0")
|
||||||
|
@ -16,6 +19,8 @@ plugins {
|
||||||
id("org.jetbrains.kotlin.jvm") version("1.9.22") //Only used by backport module
|
id("org.jetbrains.kotlin.jvm") version("1.9.22") //Only used by backport module
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val publishVersions = listOf("232", "233", "241", "242")
|
||||||
|
|
||||||
val gitVersion: groovy.lang.Closure<String> by extra
|
val gitVersion: groovy.lang.Closure<String> by extra
|
||||||
|
|
||||||
val grammarKitGenDir = "build/generated/sources/grammarkit/java"
|
val grammarKitGenDir = "build/generated/sources/grammarkit/java"
|
||||||
|
@ -416,15 +421,45 @@ project(":plugin") {
|
||||||
listProductsReleases {
|
listProductsReleases {
|
||||||
types = listOf("IU", "IC", "CL")
|
types = listOf("IU", "IC", "CL")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// publishPlugin {
|
fun distFile(it: String) = layout.buildDirectory.file("dist/ZigBrains-${pluginVersion().get()}-$it-signed.zip")
|
||||||
// dependsOn("patchChangelog")
|
|
||||||
// token = environment("PUBLISH_TOKEN")
|
publishVersions.forEach {
|
||||||
// // The pluginVersion is based on the SemVer (https://semver.org) and supports pre-release labels, like 2.1.7-alpha.3
|
tasks.register<PublishPluginTask>("jbpublish-$it") {
|
||||||
// // Specify pre-release label to publish the plugin in a custom Release Channel automatically. Read more:
|
distributionFile.set(distFile(it))
|
||||||
// // https://plugins.jetbrains.com/docs/intellij/deployment.html#specifying-a-release-channel
|
token = environment("IJ_PUBLISH_TOKEN")
|
||||||
// channels = properties("pluginVersion").map { listOf(it.split('-').getOrElse(1) { "default" }.split('.').first()) }
|
}
|
||||||
// }
|
tasks.named("publish") {
|
||||||
|
dependsOn("jbpublish-$it")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
create<MavenPublication>("maven") {
|
||||||
|
groupId = "com.falsepattern"
|
||||||
|
artifactId = "zigbrains"
|
||||||
|
version = pluginVersion().get()
|
||||||
|
|
||||||
|
publishVersions.forEach {
|
||||||
|
artifact(distFile(it)) {
|
||||||
|
classifier = "$it-signed"
|
||||||
|
extension = "zip"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
name = "mavenpattern"
|
||||||
|
url = uri("https://mvn.falsepattern.com/releases/");
|
||||||
|
credentials {
|
||||||
|
username = System.getenv("MAVEN_DEPLOY_USER")
|
||||||
|
password = System.getenv("MAVEN_DEPLOY_PASSWORD")
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
23
build.sh
23
build.sh
|
@ -15,12 +15,29 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
declare -a branches=("master" "241" "233" "232")
|
declare -a branches=("master" "241" "233" "232")
|
||||||
|
|
||||||
DEFAULT_BRANCH="${branches[0]}"
|
DEFAULT_BRANCH="${branches[0]}"
|
||||||
|
|
||||||
if [[ -z "${PRIVATE_KEY_PASSWORD}" ]]; then
|
if [[ -z "${PRIVATE_KEY_PASSWORD}" ]]; then
|
||||||
echo "Private key password does not exist!"
|
echo "PRIVATE_KEY_PASSWORD missing!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z "${MAVEN_DEPLOY_USER}"]]; then
|
||||||
|
echo "MAVEN_DEPLOY_USER missing!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z "${MAVEN_DEPLOY_PASSWORD}"]]; then
|
||||||
|
echo "MAVEN_DEPLOY_USER missing!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z "${IJ_PUBLISH_TOKEN}"]]; then
|
||||||
|
echo "MAVEN_DEPLOY_USER missing!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -59,4 +76,6 @@ git checkout "$DEFAULT_BRANCH"
|
||||||
|
|
||||||
mkdir -p build/dist
|
mkdir -p build/dist
|
||||||
|
|
||||||
cp plugin/build/distributions/*-signed.zip build/dist/
|
cp plugin/build/distributions/*-signed.zip build/dist/
|
||||||
|
|
||||||
|
./gradlew publish
|
|
@ -801,6 +801,7 @@ public class EditorEventManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final List<String> WHITESPACE_DELIMITERS = Arrays.asList(" \t\n\r".split(""));
|
private static final List<String> WHITESPACE_DELIMITERS = Arrays.asList(" \t\n\r".split(""));
|
||||||
|
private static final List<String> SYMBOL_DELIMITERS = Arrays.asList("()[]{};,".split(""));
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
public String getCompletionPrefix(Editor editor, int offset) {
|
public String getCompletionPrefix(Editor editor, int offset) {
|
||||||
|
@ -809,7 +810,7 @@ public class EditorEventManager {
|
||||||
for (int i = 0; i < offset; i++) {
|
for (int i = 0; i < offset; i++) {
|
||||||
char singleLetter = documentText.charAt(offset - i - 1);
|
char singleLetter = documentText.charAt(offset - i - 1);
|
||||||
val letterString = String.valueOf(singleLetter);
|
val letterString = String.valueOf(singleLetter);
|
||||||
if (WHITESPACE_DELIMITERS.contains(letterString) || completionTriggers.contains(letterString)) {
|
if (WHITESPACE_DELIMITERS.contains(letterString) || SYMBOL_DELIMITERS.contains(letterString) || completionTriggers.contains(letterString)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
s.append(singleLetter);
|
s.append(singleLetter);
|
||||||
|
|
Loading…
Add table
Reference in a new issue