Skip to content

Commit

Permalink
Merge pull request #356 from nils-a/release/6.0.0
Browse files Browse the repository at this point in the history
Release/6.0.0
  • Loading branch information
nils-a authored Aug 26, 2023
2 parents a686be9 + 42e8281 commit b84d93c
Show file tree
Hide file tree
Showing 17 changed files with 62 additions and 62 deletions.
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"cake.tool": {
"version": "0.38.5",
"version": "1.3.0",
"commands": [
"dotnet-cake"
]
Expand Down
18 changes: 12 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ windows-2019, ubuntu-18.04, macos-10.15 ]
os: [ windows-2022, ubuntu-22.04, macos-12 ]

steps:
- name: Checkout the requested branch
Expand All @@ -40,21 +40,23 @@ jobs:

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

# Setup Java 11 environment which is needed to build
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
# Setup dotnet 6 (and 2.1 for Wyam)

# Setup dotnet 6 (and 2.1 for Wyam, 3.1 for gitReleaseManager, 5.0 for gitVersion)
- name: Setup dotnet
uses: actions/setup-dotnet@v3.0.3
with:
dotnet-version: |
2.1.x
3.1.x
5.0.x
6.0.x
# Cache Gradle Wrapper
Expand All @@ -64,6 +66,11 @@ jobs:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}

# install libgit2-dev on ubuntu, so libgit2sharp works
- name: Install libgit-dev
if: runner.os == 'Linux'
run: sudo apt-get install -y libgit2-dev

# Cache Cake tools
- name: Cache Tools
uses: actions/cache@v3
Expand All @@ -76,8 +83,7 @@ jobs:
with:
script-path: recipe.cake
target: CI
cake-version: 0.38.5
cake-bootstrap: true
cake-version: tool-manifest

# currently, Cake.Recipe does not upload artifacts when run on gh-actions
- name: Upload Issues
Expand Down
28 changes: 9 additions & 19 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -1,26 +1,16 @@
#$ErrorActionPreference = 'Stop'
# $ErrorActionPreference = 'Stop' will break the build on *any* output to stderr.
# $ErrorActionPreference = 'Stop' will break the build on *any* output to stderr.
# i.e. calling `java -version` will break the build in that case.
# This might be solved in PS 7.1, see https://docs.microsoft.com/en-us/powershell/scripting/whats-new/what-s-new-in-powershell-71?view=powershell-7.1#breaking-changes-and-improvements

function Run([string[]]$arguments) {
$cmd = @("& dotnet")
$cmd += $arguments
$cmdLine = $cmd -join " "
Write-Verbose "> $cmdLine"
Invoke-Expression $cmdLine
Set-Location -LiteralPath $PSScriptRoot

if ($LASTEXITCODE -ne 0) {
Write-Host "Non-Zero exit code ($($LASTEXITCODE)), exiting..."
exit $LASTEXITCODE
}
}
$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = '1'
$env:DOTNET_CLI_TELEMETRY_OPTOUT = '1'
$env:DOTNET_NOLOGO = '1'

Run tool, restore
dotnet tool restore
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }

Run cake, recipe.cake, --bootstrap

$arguments = @("cake"; "recipe.cake")
$arguments += @($args)

Run $arguments
dotnet cake recipe.cake @args
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
2 changes: 0 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ export DOTNET_NOLOGO=1

dotnet tool restore

dotnet cake recipe.cake --bootstrap

dotnet cake recipe.cake "$@"
9 changes: 5 additions & 4 deletions recipe.cake
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#load nuget:?package=Cake.IntelliJ.Recipe&version=0.1.5
#load nuget:?package=Cake.IntelliJ.Recipe&version=0.2.2

Environment.SetVariableNames(
githubTokenVariable: "GITHUB_PAT"
);

BuildParameters.SetParameters(
IntelliJBuildParameters.SetParameters(
context: Context,
buildSystem: BuildSystem,
sourceDirectoryPath: "./src/rider",
Expand All @@ -18,8 +18,9 @@ BuildParameters.SetParameters(
preferredBuildAgentOperatingSystem: PlatformFamily.Linux
);

BuildParameters.PrintParameters(Context);
BuildParameters.IsDotNetCoreBuild = true; // so we get all the cool dotnet tools
IntelliJBuildParameters.PrintParameters(Context);

ToolSettings.SetToolSettings(context: Context);

Build.Run();
IntelliJBuild.Run();
2 changes: 1 addition & 1 deletion src/dotnet/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<DebugType>pdbonly</DebugType>
<!-- will be injected by gradle at build -->
<SdkVersion Condition="'$(SdkVersion)' == ''">2022.2.0</SdkVersion>
<SdkVersion Condition="'$(SdkVersion)' == ''">2023.1.0</SdkVersion>
<WaveVersion>$(SdkVersion.Substring(2,2))$(SdkVersion.Substring(5,1)).0.0</WaveVersion>
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>
Expand Down
6 changes: 3 additions & 3 deletions src/dotnet/cake-rider/CakePredefinedType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ private IDeclaredType CreateType(int index, IClrTypeName clrName)
{
lock (_types)
{
_types[index] ??= new PredefinedDeclaredTypeFromClrName(clrName, NullableAnnotation.Unknown, _module);
_types[index] ??= new PredefinedDeclaredTypeFromClrName(clrName, _module);
}
}

Expand All @@ -73,8 +73,8 @@ private IDeclaredType CreateType(int index, IClrTypeName clrName)

private class PredefinedDeclaredTypeFromClrName : DeclaredTypeFromCLRName
{
public PredefinedDeclaredTypeFromClrName(IClrTypeName clrName, NullableAnnotation annotation, IPsiModule module)
: base(clrName, annotation, module)
public PredefinedDeclaredTypeFromClrName(IClrTypeName clrName, IPsiModule module)
: base(clrName, module)
{
}

Expand Down
4 changes: 0 additions & 4 deletions src/rider/.idea/gradle.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/kotlinc.xml

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

24 changes: 12 additions & 12 deletions src/rider/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@ 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.7.0"
id("org.jetbrains.kotlin.jvm") version "1.8.0"
// gradle-intellij-plugin - read more: https://github.com/JetBrains/gradle-intellij-plugin
id("org.jetbrains.intellij") version "1.10.1"
id("com.jetbrains.rdgen") version "2022.3.0"
id("org.jetbrains.intellij") version "1.13.3"
id("com.jetbrains.rdgen") version "2023.1.2"
// gradle-changelog-plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin
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.22.0"
// ktlint linter - read more: https://github.com/JLLeitschuh/ktlint-gradle
id("org.jlleitschuh.gradle.ktlint") version "11.0.0"
id("org.jlleitschuh.gradle.ktlint") version "11.3.2"
// grammarkit to generate parser & lexer (i.e. the bnf and the flex file...)
id("org.jetbrains.grammarkit") version "2022.3"
id("org.jetbrains.grammarkit") version "2022.3.1"
}

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

group = properties("pluginGroup")
version = properties("pluginVersion")
Expand All @@ -36,10 +36,10 @@ repositories {
dependencies {
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")
testImplementation("org.junit.jupiter:junit-jupiter:5.9.3")
testRuntimeOnly("org.junit.platform:junit-platform-launcher:1.9.3")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.9.3")
testRuntimeOnly("org.junit.vintage:junit-vintage-engine:5.9.3")
}

// Configure gradle-intellij-plugin plugin.
Expand Down Expand Up @@ -105,7 +105,7 @@ tasks {

// generate the lexer (uses grammarkit)
generateLexer {
source.set("src/main/kotlin/net/cakebuild/language/psi/Cake.flex")
sourceFile.set(File(rootDir, "src/main/kotlin/net/cakebuild/language/psi/Cake.flex"))
targetDir.set("src/main/gen/net/cakebuild/language/psi")
targetClass.set("CakeLexer")
purgeOldFiles.set(true)
Expand Down Expand Up @@ -142,7 +142,7 @@ tasks {

// generate the parser (uses grammarkit)
generateParser {
source.set("src/main/kotlin/net/cakebuild/language/psi/Cake.bnf")
sourceFile.set(File(rootDir, "src/main/kotlin/net/cakebuild/language/psi/Cake.bnf"))
targetRoot.set("src/main/gen")
pathToParser.set("/net/cakebuild/language/psi/CakeParser.java")
pathToPsiRoot.set("/net/cakebuild/language/psi")
Expand Down
8 changes: 4 additions & 4 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 = 223
pluginUntilBuild = 223.*
pluginSinceBuild = 231
pluginUntilBuild = 231.*
# 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.3
pluginVerifierIdeVersions = RD-2023.1

platformType = RD
platformVersion = 2022.3-SNAPSHOT
platformVersion = 2023.1.4
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
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@
<gridbag weightx="0.0" weighty="0.0"/>
</constraints>
<properties>
<icon value="general/add.png"/>
<maximumSize width="30" height="30"/>
<minimumSize width="30" height="30"/>
<preferredSize width="30" height="30"/>
Expand All @@ -99,7 +98,6 @@
<gridbag weightx="0.0" weighty="0.0"/>
</constraints>
<properties>
<icon value="general/remove.png"/>
<label value=""/>
<maximumSize width="30" height="30"/>
<minimumSize width="30" height="30"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package net.cakebuild.settings;

import icons.CakeIcons;
import net.cakebuild.shared.ui.RegexCellEditor;

import javax.swing.JButton;
Expand Down Expand Up @@ -45,6 +46,7 @@ public CakeRunnerSettingsEditor() {
regexCellEditor.setOnValidationError(s -> { setValidationError(s); return null; });
regexCellEditor.setOnValidationSuccess(() -> { setValidationError(null); return null; });
overrides.getColumnModel().getColumn(0).setCellEditor(regexCellEditor);
addButton.setIcon(CakeIcons.GeneralAdd);
addButton.addActionListener(e -> {
model.addRow(new Object[]{"",""});
int row = model.getRowCount()-1;
Expand All @@ -54,6 +56,7 @@ public CakeRunnerSettingsEditor() {
Component textEdit = overrides.prepareEditor(editor, row, 0);
textEdit.requestFocus();
});
removeButton.setIcon(CakeIcons.GeneralRemove);
removeButton.setEnabled(false);
removeButton.addActionListener(e -> {
int row = overrides.getSelectedRow();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
<gridbag weightx="0.0" weighty="0.0"/>
</constraints>
<properties>
<icon value="general/add.png"/>
<maximumSize width="30" height="30"/>
<minimumSize width="30" height="30"/>
<opaque value="true"/>
Expand All @@ -43,7 +42,6 @@
<gridbag weightx="0.0" weighty="0.0"/>
</constraints>
<properties>
<icon value="general/remove.png"/>
<label value=""/>
<maximumSize width="30" height="30"/>
<minimumSize width="30" height="30"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package net.cakebuild.settings.controls;

import icons.CakeIcons;

import javax.swing.*;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableCellEditor;
Expand Down Expand Up @@ -34,6 +36,7 @@ public SimpleAddEditControl(String[] headers, Supplier<String[]> newItemGenerato
int row = table.getSelectedRow();
removeItem.setEnabled(row >= 0);
});
addItem.setIcon(CakeIcons.GeneralAdd);
addItem.addActionListener(e -> {
model.addRow(newItemGenerator.get());
int row = model.getRowCount()-1;
Expand All @@ -43,6 +46,7 @@ public SimpleAddEditControl(String[] headers, Supplier<String[]> newItemGenerato
Component textEdit = table.prepareEditor(editor, row, 0);
textEdit.requestFocus();
});
removeItem.setIcon(CakeIcons.GeneralRemove);
removeItem.setEnabled(false);
removeItem.addActionListener(e -> {
int row = table.getSelectedRow();
Expand Down
6 changes: 6 additions & 0 deletions src/rider/src/main/kotlin/icons/CakeIcons.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,10 @@ object CakeIcons {

@JvmField
val CakeTestProjectTemplate = IconLoader.getIcon("/icons/CakeTestProject.svg", CakeIcons.javaClass)

@JvmField
val GeneralAdd = IconLoader.getIcon("/general/add.svg", CakeIcons.javaClass)

@JvmField
val GeneralRemove = IconLoader.getIcon("/general/remove.svg", CakeIcons.javaClass)
}
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 @@ -18,7 +18,7 @@
<projectConfigurable parentId="build" instance="net.cakebuild.settings.CakeGeneralSettingsConfigurable"
id="net.cakebuild.settings.cake" displayName="Cake" nonDefaultProject="false" />
<projectConfigurable parentId="net.cakebuild.settings.cake" instance="net.cakebuild.settings.CakeSearchPathSettingsConfigurable"
id="net.cakebuild.settings.cake.runner.paths" displayName="Search paths" nonDefaultProject="false" />
id="net.cakebuild.settings.cake.runner.paths" displayName="Search Paths" nonDefaultProject="false" />
<projectConfigurable parentId="net.cakebuild.settings.cake" instance="net.cakebuild.settings.CakeRunnerSettingsConfigurable"
id="net.cakebuild.settings.cake.runner" displayName="Runner" nonDefaultProject="false" />
<projectService serviceImplementation="net.cakebuild.settings.CakeSettings" />
Expand Down

0 comments on commit b84d93c

Please sign in to comment.