Skip to content

Commit

Permalink
Merge pull request #306 from nils-a/release/5.0.0
Browse files Browse the repository at this point in the history
Release/5.0.0
  • Loading branch information
nils-a authored Dec 14, 2022
2 parents cd9b8cb + b367790 commit a686be9
Show file tree
Hide file tree
Showing 21 changed files with 51 additions and 49 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,18 @@ jobs:

# Validates the gradle wrappers and saves us from getting malicious PRs
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1.0.4
uses: gradle/wrapper-validation-action@v1.0.5

# Setup Java 11 environment which is needed to build
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
java-version: '17'

# Setup dotnet 6 (and 2.1 for Wyam)
- name: Setup dotnet
uses: actions/setup-dotnet@v3.0.0
uses: actions/setup-dotnet@v3.0.3
with:
dotnet-version: |
2.1.x
Expand Down
2 changes: 1 addition & 1 deletion src/rider/.idea/kotlinc.xml

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

2 changes: 1 addition & 1 deletion src/rider/.idea/misc.xml

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

30 changes: 11 additions & 19 deletions src/rider/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,35 @@ plugins {
id("java")
// Kotlin support
// do NOT update kotlin - kotlin version must match platform version, see https://plugins.jetbrains.com/docs/intellij/kotlin.html#kotlin-standard-library
id("org.jetbrains.kotlin.jvm") version "1.6.21"
id("org.jetbrains.kotlin.jvm") version "1.7.0"
// gradle-intellij-plugin - read more: https://github.com/JetBrains/gradle-intellij-plugin
id("org.jetbrains.intellij") version "1.9.0"
id("com.jetbrains.rdgen") version "2022.2.5"
id("org.jetbrains.intellij") version "1.10.1"
id("com.jetbrains.rdgen") version "2022.3.0"
// gradle-changelog-plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin
id("org.jetbrains.changelog") version "1.3.1"
id("org.jetbrains.changelog") version "2.0.0"
// detekt linter - read more: https://detekt.github.io/detekt/gradle.html
id("io.gitlab.arturbosch.detekt") version "1.21.0"
id("io.gitlab.arturbosch.detekt") version "1.22.0"
// ktlint linter - read more: https://github.com/JLLeitschuh/ktlint-gradle
id("org.jlleitschuh.gradle.ktlint") version "11.0.0"
// grammarkit to generate parser & lexer (i.e. the bnf and the flex file...)
id("org.jetbrains.grammarkit") version "2021.2.2"
id("org.jetbrains.grammarkit") version "2022.3"
}

val jvmVersion = "11"
val kotlinVersion = "1.6" // should match org.jetbrains.kotlin.jvm (major.minor)
val jvmVersion = "17"
val kotlinVersion = "1.7" // should match org.jetbrains.kotlin.jvm (major.minor)

group = properties("pluginGroup")
version = properties("pluginVersion")

// Configure project's dependencies
repositories {
mavenCentral()
jcenter()
}
dependencies {
detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.21.0")
detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.22.0")

testImplementation("org.junit.jupiter:junit-jupiter:5.9.1")
testRuntimeOnly("org.junit.platform:junit-platform-launcher:1.9.1")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.9.1")
testRuntimeOnly("org.junit.vintage:junit-vintage-engine:5.9.1")
}
Expand Down Expand Up @@ -255,7 +255,7 @@ tasks {
jvmTarget = jvmVersion
languageVersion = kotlinVersion
apiVersion = kotlinVersion
freeCompilerArgs = listOf("-Xjvm-default=compatibility")
freeCompilerArgs = listOf("-Xjvm-default=all-compatibility")
}
}
withType<Detekt> {
Expand All @@ -267,14 +267,6 @@ tasks {
txt.required.set(false)
}
}
// workaround for https://youtrack.jetbrains.com/issue/IDEA-210683
getByName<JavaExec>("buildSearchableOptions") {
jvmArgs(
// I gave up on tracking individual illegal access violations.
// This seems to be an integral and unfixable part of IntelliJ.
"--illegal-access=permit"
)
}
withType<org.jlleitschuh.gradle.ktlint.tasks.KtLintCheckTask> {
exclude("**/gen/**", "**/*.Generated.kt")
}
Expand Down
6 changes: 0 additions & 6 deletions src/rider/detekt-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@ empty-blocks:
EmptyFunctionBlock:
ignoreOverridden: true

formatting:
Indentation:
continuationIndentSize: 8
ParameterListWrapping:
indentSize: 4

style:
ReturnCount:
max: 10
Expand Down
6 changes: 3 additions & 3 deletions src/rider/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
pluginGroup = net.cakebuild
pluginName = cake-rider
pluginVersion = 0.1.0-alpha.1
pluginSinceBuild = 222
pluginSinceBuild = 223
pluginUntilBuild = 223.*
# Plugin Verifier integration -> https://github.com/JetBrains/gradle-intellij-plugin#plugin-verifier-dsl
# See https://jb.gg/intellij-platform-builds-list for available build versions.
# or https://data.services.jetbrains.com/products?fields=name,releases.downloads,releases.version,releases.build,releases.type&code=RD
pluginVerifierIdeVersions = RD-2022.2,RD-2022.3-EAP1
pluginVerifierIdeVersions = RD-2022.3

platformType = RD
platformVersion = 2022.2
platformVersion = 2022.3-SNAPSHOT
platformDownloadSources = true
# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
Expand Down
2 changes: 1 addition & 1 deletion src/rider/gradle/wrapper/gradle-wrapper.properties
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.8.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class EnsureNetToolBeforeRunTaskProvider :

override fun getIcon() = CakeIcons.CakeAction

override fun getDescription(task: EnsureNetToolBeforeRunTask?) = "Ensure Cake .NET Tool (Global) is installed"
override fun getDescription(task: EnsureNetToolBeforeRunTask) = "Ensure Cake .NET Tool (Global) is installed"

override fun createTask(runConfiguration: RunConfiguration): EnsureNetToolBeforeRunTask? {
if (runConfiguration is CakeScriptConfiguration) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ class CakeVersion internal constructor(private val parts: List<Int>) : Comparabl
*/
@Suppress("CHANGING_ARGUMENTS_EXECUTION_ORDER_FOR_NAMED_VARARGS")
fun parse(text: String): CakeVersion {
if (text.isEmpty()) {
throw IllegalArgumentException("text can not be empty.")
}
require(!text.isEmpty()) { "text can not be empty." }
var suffixText: String? = null
var suffix: Int? = null
val suffixMatch = this.suffixMatcher.find(text)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import com.intellij.codeInsight.template.TemplateContextType
import com.intellij.psi.util.PsiUtilCore
import net.cakebuild.language.CakeLanguage

class CakeContext : TemplateContextType("Cake", "Cake") {
class CakeContext : TemplateContextType("Cake") {
override fun isInContext(templateActionContext: TemplateActionContext): Boolean {
val lang = PsiUtilCore.getLanguageAtOffset(templateActionContext.file, templateActionContext.startOffset)
return CakeLanguage.`is`(lang)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ class CakeRiderNewRunConfigurationTreeGroupingProvider : RiderNewRunConfiguratio
override fun getGroups(project: Project): List<RiderNewRunConfigurationTreeGroupingProvider.Group> {
return listOf(
RiderNewRunConfigurationTreeGroupingProvider.Group(
CakeIcons.CakeAction, "Cake",
CakeIcons.CakeAction,
"Cake",
listOf(
CakeFrostingConfigurationType.id,
CakeScriptConfigurationType.id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,16 @@ fun ControlViewBuilder.customBuild(viewModel: RunConfigurationViewModelBase, pro
continue
}

if (writeIndex != readIndex)
if (writeIndex != readIndex) {
this[writeIndex] = element
}

writeIndex++
}
if (writeIndex < size) {
for (removeIndex in lastIndex downTo writeIndex)
for (removeIndex in lastIndex downTo writeIndex) {
removeAt(removeIndex)
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,12 @@ class CakeFrostingConfigurationParameters(val project: Project) {

fun copy(): CakeFrostingConfigurationParameters {
return CakeFrostingConfigurationParameters(
project, taskName, projectFilePath, verbosity, additionalArguments, copyEnvs(envs)
project,
taskName,
projectFilePath,
verbosity,
additionalArguments,
copyEnvs(envs)
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ class CakeFrostingConfigurationType :
runManager.addConfiguration(configurationSettings)

return RunConfiguration(
runConfigurationTemplate.typeId, name, projectFilePath, runConfigurationTemplate.executor
runConfigurationTemplate.typeId,
name,
projectFilePath,
runConfigurationTemplate.executor
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ class TaskEditor(lifetime: Lifetime, name: String, id: String) : CustomControlBa
override fun documentChanged(event: com.intellij.openapi.editor.event.DocumentEvent) {
text.set(textField.text)
}
})
}
)

return makeLabeledComponent(textField)
}
Expand All @@ -87,7 +88,8 @@ class CakeFrostingConfigurationViewModel(private val lifetime: Lifetime, private
private val programParametersEditor: ProgramParametersEditor =
ProgramParametersEditor("Arguments:", "Program_arguments", lifetime)
private val environmentVariablesEditor: EnvironmentVariablesEditor = EnvironmentVariablesEditor(
RiderRunBundle.message("label.environment.variables.with.colon"), "Environment_variables"
RiderRunBundle.message("label.environment.variables.with.colon"),
"Environment_variables"
)

override val controls: List<ControlBase> = mutableListOf(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class CakeSettings : PersistentStateComponent<CakeSettings> {
var cakeRunnerOverrides = mutableMapOf(Pair("^.*windows.*$", "\${USERPROFILE}\\.dotnet\\tools\\dotnet-cake.exe"))
var cakeScriptSearchPaths: Collection<String> = mutableListOf(".")
var cakeScriptSearchIgnores: Collection<String> = mutableListOf(".*/tools/.*")

// do we need a settings-UI for these?
var downloadContentUrlConfigurationFile =
"https://cakebuild.net/download/configuration"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ class GitHubErrorReporter : ErrorReportSubmitter() {
parentComponent: Component,
consumer: Consumer<in SubmittedReportInfo>
): Boolean {

try {
if (events.isNotEmpty()) {
val event = events.first()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,12 @@ abstract class NuGetProvider {
class NuGetServiceIndex {
val resources: List<NuGetServiceResource>? = null
}

@JsonIgnoreProperties(ignoreUnknown = true)
class NuGetServiceResource {
@get:JsonProperty("@type")
val type: String? = null

@get:JsonProperty("@id")
val url: String? = null
val comment: String? = null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class SearchQueryService : NuGetProvider() {
class SearchResult {
val data: List<NuGetPackages> = listOf()
}

@JsonIgnoreProperties(ignoreUnknown = true)
class NuGetPackages {
val id: String = ""
Expand Down
2 changes: 1 addition & 1 deletion src/rider/src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<stepsBeforeRunProvider implementation="net.cakebuild.beforeRunner.RestoreNetToolsBeforeRunTaskProvider"/>
<createFromTemplateHandler implementation="net.cakebuild.actions.CakeCreateFromTemplateHandler"/>
<defaultLiveTemplates file="/liveTemplates/Cake.xml"/>
<liveTemplateContext implementation="net.cakebuild.liveTemplates.CakeContext"/>
<liveTemplateContext implementation="net.cakebuild.liveTemplates.CakeContext" contextId="Cake"/>
<lang.parserDefinition language="Cake"
implementationClass="net.cakebuild.language.CakeParserDefinition"/>
<lang.psiStructureViewFactory language="Cake"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ class CakeVersionTests {
fun `should not be equal on null`() {
val v = CakeVersion(listOf(1, 2, 3))

@Suppress("SENSELESS_COMPARISON") val actual = v == null
@Suppress("SENSELESS_COMPARISON")
val actual = v == null

assertEquals(false, actual)
}
Expand Down Expand Up @@ -224,6 +225,7 @@ class CakeVersionTests {
Arguments.of(CakeVersion(listOf(1, 2, 3)), CakeVersion(listOf(1, 2, 4)), true),
Arguments.of(CakeVersion.parse("1.0.0-alpha1"), CakeVersion.parse("1.0.0-beta1"), true)
)

@Suppress("Unused")
@JvmStatic
fun compareGreaterSource(): Stream<Arguments> =
Expand Down

0 comments on commit a686be9

Please sign in to comment.