diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 50f1dc2..f78ae57 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -20,7 +20,7 @@ jobs: ~/.gradle/caches ~/.gradle/wrapper key: ${{ runner.os }}-Build-${{ hashFiles('gradlew.bat', 'src/dotnet/*/*.csproj', 'src/dotnet/*.props', 'gradle-wrapper.properties') }} - - run: ./gradlew :rdgen --no-daemon + - run: ./gradlew :protocol:rdgen --no-daemon - run: ./gradlew :buildPlugin -PBuildConfiguration=Release --no-daemon - uses: mad9000/actions-find-and-replace-string@5 id: fix_branch_name @@ -48,5 +48,5 @@ jobs: ~/.gradle/caches ~/.gradle/wrapper key: ${{ runner.os }}-Test-${{ hashFiles('gradlew.bat', 'src/dotnet/*/*.csproj', 'src/dotnet/*.props', 'gradle-wrapper.properties') }} - - run: ./gradlew :rdgen --no-daemon + - run: ./gradlew :protocol:rdgen --no-daemon - run: ./gradlew :testDotNet --no-daemon diff --git a/.gitignore b/.gitignore index 55c8536..2bbee31 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,7 @@ output *.cache # IDEs +/.intellijPlatform /.idea/*.iml /.idea/*.xml /.idea/.idea.*/*.iml diff --git a/.idea/.idea.ReSharperPlugin.ODataCliUi/.idea/runConfigurations/rdgen__Unix_.xml b/.idea/.idea.ReSharperPlugin.ODataCliUi/.idea/runConfigurations/rdgen__Unix_.xml index 2aadf33..05a722c 100644 --- a/.idea/.idea.ReSharperPlugin.ODataCliUi/.idea/runConfigurations/rdgen__Unix_.xml +++ b/.idea/.idea.ReSharperPlugin.ODataCliUi/.idea/runConfigurations/rdgen__Unix_.xml @@ -1,7 +1,7 @@ \ No newline at end of file diff --git a/build.gradle b/build.gradle deleted file mode 100644 index 6f01eb0..0000000 --- a/build.gradle +++ /dev/null @@ -1,239 +0,0 @@ -// Reference https://www.jetbrains.org/intellij/sdk/docs/tutorials/build_system/gradle_guide.html -import org.apache.tools.ant.taskdefs.condition.Os - -plugins { - id 'java' - id 'org.jetbrains.kotlin.jvm' version '1.8.10' - id 'org.jetbrains.intellij' version '1.13.3' // See https://github.com/JetBrains/gradle-intellij-plugin/releases - id 'com.jetbrains.rdgen' version '2024.1.1' // See https://github.com/JetBrains/rd/releases - id 'me.filippov.gradle.jvm.wrapper' version '0.14.0' -} - -ext { - isWindows = Os.isFamily(Os.FAMILY_WINDOWS) - rdLibDirectory = { - new File(setupDependencies.idea.get().classes, "lib/rd") - } -} - -repositories { - maven { url 'https://cache-redirector.jetbrains.com/intellij-repository/snapshots' } - maven { url 'https://cache-redirector.jetbrains.com/maven-central' } -} - -wrapper { - gradleVersion = '7.6' - distributionType = Wrapper.DistributionType.ALL - distributionUrl = "https://cache-redirector.jetbrains.com/services.gradle.org/distributions/gradle-${gradleVersion}-all.zip" -} - -version = ext.PluginVersion - -tasks.named("processResources") { - from("dependencies.json", { into "META-INF" }) -} - -sourceSets { - main { - java.srcDir 'src/rider/main/java' - kotlin.srcDir 'src/rider/main/kotlin' - resources.srcDir 'src/rider/main/resources' - } -} - -compileKotlin { - kotlinOptions { jvmTarget = "17" } -} - -task setBuildTool { - doLast { - ext.executable = "dotnet" - ext.args = ["msbuild"] - - if (isWindows) { - ByteArrayOutputStream stdout = new ByteArrayOutputStream() - exec { - executable "${rootDir}\\tools\\vswhere.exe" - args '-latest','-property','installationPath','-products','*' - standardOutput = stdout - workingDir rootDir - } - - def directory = stdout.toString().trim() - if (directory) { - List files = new FileNameFinder().getFileNames("${directory}\\MSBuild", "**/MSBuild.exe") - ext.executable = files.get(0) - ext.args = ["/v:minimal"] - } - } - - ext.args << "${DotnetSolution}" - ext.args << "/p:Configuration=${BuildConfiguration}" - ext.args << "/p:HostFullIdentifier=" - } -} - -task compileDotNet { - dependsOn setBuildTool - doLast { - def arguments = setBuildTool.args.clone() - arguments << "/t:Restore;Rebuild" - exec { - executable setBuildTool.executable - args arguments - workingDir rootDir - } - } -} - -task testDotNet { - doLast { - exec { - executable "dotnet" - args "test","${DotnetSolution}","--logger","GitHubActions" - workingDir rootDir - } - } -} - -buildPlugin { - doLast { - copy { - from "${buildDir}/distributions/${rootProject.name}-${version}.zip" - into "${rootDir}/output" - } - - // TODO: See also org.jetbrains.changelog: https://github.com/JetBrains/gradle-changelog-plugin - def changelogText = file("${rootDir}/CHANGELOG.md").text - def changelogMatches = changelogText =~ /(?s)(-.+?)(?=##|$)/ - def changeNotes = changelogMatches.collect { - it[1].replaceAll(/(?s)- /, "\u2022 ").replaceAll(/`/, "").replaceAll(/,/, "%2C").replaceAll(/;/, "%3B") - }.take(1).join("") - - def arguments = setBuildTool.args.clone() - arguments << "/t:Pack" - arguments << "/p:PackageOutputPath=${rootDir}/output" - arguments << "/p:PackageReleaseNotes=${changeNotes}" - arguments << "/p:PackageVersion=${version}" - exec { - executable setBuildTool.executable - args arguments - workingDir rootDir - } - } -} - -intellij { - type = 'RD' - version = "${ProductVersion}" - downloadSources = false - instrumentCode = false - // TODO: add plugins - // plugins = ["uml", "com.jetbrains.ChooseRuntime:1.0.9"] -} - -runIde { - // Match Rider's default heap size of 1.5Gb (default for runIde is 512Mb) - maxHeapSize = "1500m" - - // Rider's backend doesn't support dynamic plugins. It might be possible to work with auto-reload of the frontend - // part of a plugin, but there are dangers about keeping plugins in sync - autoReloadPlugins = false - - // gradle-intellij-plugin will download the default version of the JBR for the snapshot. Update if required - // jbrVersion = "jbr_jcef-11_0_6b765.40" // https://confluence.jetbrains.com/display/JBR/Release+notes -} - -rdgen { - def modelDir = new File(rootDir, "protocol/src/main/kotlin/model") - def csOutput = new File(rootDir, "src/dotnet/${DotnetPluginId}/Rider") - def ktOutput = new File(rootDir, "src/rider/main/kotlin/${RiderPluginId.replace('.','/').toLowerCase()}") - - verbose = true - classpath { - "${rdLibDirectory()}/rider-model.jar" - } - sources "${modelDir}/rider" - hashFolder = "${buildDir}" - packages = "model.rider" - - generator { - language = "kotlin" - transform = "asis" - root = "com.jetbrains.rider.model.nova.ide.IdeRoot" - namespace = "com.jetbrains.rider.model" - directory = "$ktOutput" - } - - generator { - language = "csharp" - transform = "reversed" - root = "com.jetbrains.rider.model.nova.ide.IdeRoot" - namespace = "JetBrains.Rider.Model" - directory = "$csOutput" - } -} - -patchPluginXml { - // TODO: See also org.jetbrains.changelog: https://github.com/JetBrains/gradle-changelog-plugin - def changelogText = file("${rootDir}/CHANGELOG.md").text - def changelogMatches = changelogText =~ /(?s)(-.+?)(?=##|$)/ - - changeNotes = changelogMatches.collect { - it[1].replaceAll(/(?s)\r?\n/, "
\n") - }.take(1).join('') -} - -prepareSandbox { - dependsOn compileDotNet - - def outputFolder = "${rootDir}/src/dotnet/${DotnetPluginId}/bin/${DotnetPluginId}.Rider/${BuildConfiguration}" - def dllFiles = [ - "$outputFolder/${DotnetPluginId}.dll", - "$outputFolder/${DotnetPluginId}.pdb", - // TODO: add additional assemblies - ] - - dllFiles.forEach({ f -> - def file = file(f) - from(file, { into "${rootProject.name}/dotnet" }) - }) - - doLast { - dllFiles.forEach({ f -> - def file = file(f) - if (!file.exists()) throw new RuntimeException("File ${file} does not exist") - }) - } -} - -runPluginVerifier { - ideVersions = [ - "RD-2024.1", - "RD-2024.1.1", - "RD-2024.1.2", - "RD-2024.1.3", - "RD-2024.1.4", - "RD-2024.1.5", - "RD-2024.1.6" - ] -} - -signPlugin { - certificateChain = providers.environmentVariable("CERTIFICATE_CHAIN") - privateKey = providers.environmentVariable("PRIVATE_KEY") - password = providers.environmentVariable("PRIVATE_KEY_PASSWORD") -} -publishPlugin { - dependsOn testDotNet - dependsOn buildPlugin - token = "${PublishToken}" - - doLast { - exec { - executable "dotnet" - args "nuget","push","output/${DotnetPluginId}.${version}.nupkg","--api-key","${PublishToken}","--source","https://plugins.jetbrains.com" - workingDir rootDir - } - } -} diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000..2400909 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,248 @@ +import com.jetbrains.plugin.structure.base.utils.isFile +import groovy.ant.FileNameFinder +import org.apache.tools.ant.taskdefs.condition.Os +import org.jetbrains.intellij.platform.gradle.Constants +import org.jetbrains.intellij.platform.gradle.IntelliJPlatformType +import java.io.ByteArrayOutputStream + +plugins { + id ("java") + alias(libs.plugins.kotlinJvm) + alias(libs.plugins.intellijPlatform) + alias(libs.plugins.gradleJvmWrapper) +} + +val isWindows = Os.isFamily(Os.FAMILY_WINDOWS) +extra["isWindows"] = isWindows + +version = extra["PluginVersion"] as String + +val DotnetSolution: String by project +val BuildConfiguration: String by project +val ProductVersion: String by project +val DotnetPluginId: String by project +val RiderPluginId: String by project +val PublishToken: String by project + +allprojects { + repositories { + maven { setUrl("https://cache-redirector.jetbrains.com/maven-central") } + } +} + +repositories { + intellijPlatform { + defaultRepositories() + intellijDependencies() + jetbrainsRuntime() + } +} + +dependencies { + intellijPlatform { + rider(ProductVersion, false) + instrumentationTools() + jetbrainsRuntime() + + // TODO: add plugins + // bundledPlugin("org.jetbrains.plugins.terminal") + // bundledPlugin("com.jetbrains.ChooseRuntime:1.0.9") + } +} + +tasks.wrapper { + gradleVersion = "8.8" + distributionType = Wrapper.DistributionType.ALL + distributionUrl = "https://cache-redirector.jetbrains.com/services.gradle.org/distributions/gradle-${gradleVersion}-all.zip" +} + +tasks.processResources { + from("dependencies.json") { into("META-INF") } +} + +sourceSets { + main { + java.srcDir("src/rider/main/java") + kotlin.srcDir("src/rider/main/kotlin") + resources.srcDir("src/rider/main/resources") + } +} + +tasks.compileKotlin { + kotlinOptions { jvmTarget = "17" } +} + +intellijPlatform { + pluginVerification { + cliPath = File("/libs/verifier-cli-1.373-all.jar") // https://github.com/JetBrains/intellij-plugin-verifier + ides { + ides(listOf( + "RD-2024.1", + "RD-2024.1.1", + "RD-2024.1.2", + "RD-2024.1.3", + "RD-2024.1.4", + "RD-2024.1.5", + "RD-2024.1.6" + )) + } + } + + signing { + cliPath = File("/libs/marketplace-zip-signer-cli-0.1.24.jar") // https://github.com/JetBrains/marketplace-zip-signer + certificateChain = providers.environmentVariable("CERTIFICATE_CHAIN") + privateKey = providers.environmentVariable("PRIVATE_KEY") + password = providers.environmentVariable("PRIVATE_KEY_PASSWORD") + } +} + +val setBuildTool by tasks.registering { + doLast { + extra["executable"] = "dotnet" + var args = mutableListOf("msbuild") + + if (isWindows) { + val stdout = ByteArrayOutputStream() + exec { + executable("${rootDir}\\tools\\vswhere.exe") + args("-latest", "-property", "installationPath", "-products", "*") + standardOutput = stdout + workingDir(rootDir) + } + + val directory = stdout.toString().trim() + if (directory.isNotEmpty()) { + val files = FileNameFinder().getFileNames("${directory}\\MSBuild", "**/MSBuild.exe") + extra["executable"] = files[0] + args = mutableListOf("/v:minimal") + } + } + + args.add(DotnetSolution) + args.add("/p:Configuration=${BuildConfiguration}") + args.add("/p:HostFullIdentifier=") + extra["args"] = args + } +} + +val compileDotNet by tasks.registering { + dependsOn(setBuildTool) + doLast { + val executable: String by setBuildTool.get().extra + val arguments = (setBuildTool.get().extra["args"] as List).toMutableList() + arguments.add("/t:Restore;Rebuild") + exec { + executable(executable) + args(arguments) + workingDir(rootDir) + } + } +} + +val testDotNet by tasks.registering { + doLast { + exec { + executable("dotnet") + args("test", DotnetSolution,"--logger","GitHubActions") + workingDir(rootDir) + } + } +} + +tasks.buildPlugin { + doLast { + copy { + from("${buildDir}/distributions/${rootProject.name}-${version}.zip") + into("${rootDir}/output") + } + + // TODO: See also org.jetbrains.changelog: https://github.com/JetBrains/gradle-changelog-plugin + val changelogText = file("${rootDir}/CHANGELOG.md").readText() + val changelogMatches = Regex("(?s)(-.+?)(?=##|$)").findAll(changelogText) + val changeNotes = changelogMatches.map { + it.groups[1]!!.value.replace("(?s)- ".toRegex(), "\u2022 ").replace("`", "").replace(",", "%2C").replace(";", "%3B") + }.take(1).joinToString() + + val executable: String by setBuildTool.get().extra + val arguments = (setBuildTool.get().extra["args"] as List).toMutableList() + arguments.add("/t:Pack") + arguments.add("/p:PackageOutputPath=${rootDir}/output") + arguments.add("/p:PackageReleaseNotes=${changeNotes}") + arguments.add("/p:PackageVersion=${version}") + exec { + executable(executable) + args(arguments) + workingDir(rootDir) + } + } +} + +tasks.runIde { + // Match Rider's default heap size of 1.5Gb (default for runIde is 512Mb) + maxHeapSize = "1500m" +} + +tasks.patchPluginXml { + // TODO: See also org.jetbrains.changelog: https://github.com/JetBrains/gradle-changelog-plugin + val changelogText = file("${rootDir}/CHANGELOG.md").readText() + val changelogMatches = Regex("(?s)(-.+?)(?=##|\$)").findAll(changelogText) + + changeNotes.set(changelogMatches.map { + it.groups[1]!!.value.replace("(?s)\r?\n".toRegex(), "
\n") + }.take(1).joinToString()) +} + +tasks.prepareSandbox { + dependsOn(compileDotNet) + + val outputFolder = "${rootDir}/src/dotnet/${DotnetPluginId}/bin/${DotnetPluginId}.Rider/${BuildConfiguration}" + val dllFiles = listOf( + "$outputFolder/${DotnetPluginId}.dll", + "$outputFolder/${DotnetPluginId}.pdb", + // TODO: add additional assemblies + ) + + dllFiles.forEach { f -> + val file = file(f) + from(file, { into("${rootProject.name}/dotnet") }) + } + + doLast { + dllFiles.forEach { f -> + val file = file(f) + if (!file.exists()) throw RuntimeException("File $file does not exist") + } + } +} + +tasks.publishPlugin { + dependsOn(testDotNet) + dependsOn(tasks.buildPlugin) + token.set(PublishToken) + + doLast { + exec { + executable("dotnet") + args("nuget", "push", "output/${DotnetPluginId}.${version}.nupkg", "--api-key", PublishToken, "--source", "https://plugins.jetbrains.com") + workingDir(rootDir) + } + } +} + + +val riderModel: Configuration by configurations.creating { + isCanBeConsumed = true + isCanBeResolved = false +} + +artifacts { + add(riderModel.name, provider { + intellijPlatform.platformPath.resolve("lib/rd/rider-model.jar").also { + check(it.isFile) { + "rider-model.jar is not found at $riderModel" + } + } + }) { + builtBy(Constants.Tasks.INITIALIZE_INTELLIJ_PLATFORM_PLUGIN) + } +} diff --git a/gradle.properties b/gradle.properties index 7943777..98c829e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -22,3 +22,9 @@ ProductVersion=2024.1 # Kotlin 1.4 will bundle the stdlib dependency by default, causing problems with the version bundled with the IDE # https://blog.jetbrains.com/kotlin/2020/07/kotlin-1-4-rc-released/#stdlib-default kotlin.stdlib.default.dependency=false + +# Required to download Rider artifacts from Maven (and not "binary" releases from CDN). +org.jetbrains.intellij.platform.buildFeature.useBinaryReleases=false + +# Prevent Java heap space error after migration to org.jetbrains.intellij.platform +org.gradle.jvmargs=-Xmx1024m diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 0000000..a16d695 --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,15 @@ +[versions] +kotlin = "1.8.20" # https://plugins.jetbrains.com/docs/intellij/using-kotlin.html#kotlin-standard-library +rdGen = "2024.1.1" # https://github.com/JetBrains/rd/releases +intellijPlatform = "2.0.1" # https://github.com/JetBrains/intellij-platform-gradle-plugin/releases +gradleJvmWrapper = "0.14.0" # https://github.com/JetBrains/intellij-platform-gradle-plugin/releases + +[libraries] +kotlinStdLib = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib", version.ref = "kotlin" } +rdGen = { group = "com.jetbrains.rd", name = "rd-gen", version.ref = "rdGen" } + +[plugins] +kotlinJvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } +rdGen = { id = "com.jetbrains.rdgen", version.ref = "rdGen" } +intellijPlatform = { id = "org.jetbrains.intellij.platform", version.ref = "intellijPlatform" } +gradleJvmWrapper = { id = "me.filippov.gradle.jvm.wrapper", version.ref = "gradleJvmWrapper" } \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 943f0cb..e644113 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 183cef7..7776c6b 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://cache-redirector.jetbrains.com/services.gradle.org/distributions/gradle-7.6-all.zip +distributionUrl=https\://cache-redirector.jetbrains.com/services.gradle.org/distributions/gradle-8.8-all.zip networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 7689b57..f4fae37 100755 --- a/gradlew +++ b/gradlew @@ -55,7 +55,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -83,10 +83,8 @@ done # This is normally unused # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -224,10 +222,13 @@ location of your Java installation." fi else JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. @@ -235,7 +236,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac @@ -243,7 +244,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then '' | soft) :;; #( *) # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -288,6 +289,9 @@ if "$cygwin" || "$msys" ; then done fi +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + # Collect all arguments for the java command; # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of # shell script including quotes and variable substitutions, so put them in diff --git a/gradlew.bat b/gradlew.bat index f80956a..8adb778 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -119,11 +119,11 @@ set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -133,11 +133,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail diff --git a/libs/marketplace-zip-signer-cli-0.1.24.jar b/libs/marketplace-zip-signer-cli-0.1.24.jar new file mode 100644 index 0000000..ed1b602 Binary files /dev/null and b/libs/marketplace-zip-signer-cli-0.1.24.jar differ diff --git a/libs/verifier-cli-1.373-all.jar b/libs/verifier-cli-1.373-all.jar new file mode 100644 index 0000000..0f3b15e Binary files /dev/null and b/libs/verifier-cli-1.373-all.jar differ diff --git a/protocol/build.gradle b/protocol/build.gradle deleted file mode 100644 index 7017786..0000000 --- a/protocol/build.gradle +++ /dev/null @@ -1,17 +0,0 @@ -plugins { - id 'java' - id 'org.jetbrains.kotlin.jvm' -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib" - implementation name: "rd-gen" - implementation name: "rider-model" -} - -repositories { - mavenCentral() - flatDir { - dirs rdLibDirectory().absolutePath - } -} \ No newline at end of file diff --git a/protocol/build.gradle.kts b/protocol/build.gradle.kts new file mode 100644 index 0000000..1cfb370 --- /dev/null +++ b/protocol/build.gradle.kts @@ -0,0 +1,52 @@ +import com.jetbrains.rd.generator.gradle.RdGenTask +import java.util.* + +plugins { + alias(libs.plugins.kotlinJvm) + alias(libs.plugins.rdGen) +} + +dependencies { + implementation(libs.kotlinStdLib) + implementation(libs.rdGen) + implementation( + project( + mapOf( + "path" to ":", + "configuration" to "riderModel" + ) + ) + ) +} + +val DotnetPluginId: String by rootProject +val RiderPluginId: String by rootProject + +rdgen { + val csOutput = File(rootDir, "src/dotnet/${DotnetPluginId}/Rider") + val ktOutput = File(rootDir, "src/rider/main/kotlin/${RiderPluginId.replace('.','/').lowercase(Locale.getDefault())}") + verbose = true + packages = "model.rider" + + generator { + language = "kotlin" + transform = "asis" + root = "com.jetbrains.rider.model.nova.ide.IdeRoot" + namespace = "com.jetbrains.rider.model" + directory = "$ktOutput" + } + + generator { + language = "csharp" + transform = "reversed" + root = "com.jetbrains.rider.model.nova.ide.IdeRoot" + namespace = "JetBrains.Rider.Model" + directory = "$csOutput" + } +} + +tasks.withType { + val classPath = sourceSets["main"].runtimeClasspath + dependsOn(classPath) + classpath(classPath) +} \ No newline at end of file diff --git a/settings.gradle b/settings.gradle.kts similarity index 62% rename from settings.gradle rename to settings.gradle.kts index 03afe75..73f3a6e 100644 --- a/settings.gradle +++ b/settings.gradle.kts @@ -1,9 +1,9 @@ pluginManagement { // Provide repositories to resolve plugins repositories { - maven { url "https://cache-redirector.jetbrains.com/plugins.gradle.org" } - maven { url "https://cache-redirector.jetbrains.com/dl.bintray.com/kotlin/kotlin-eap" } - maven { url "https://cache-redirector.jetbrains.com/myget.org.rd-snapshots.maven" } + maven { setUrl("https://cache-redirector.jetbrains.com/plugins.gradle.org") } + maven { setUrl("https://cache-redirector.jetbrains.com/maven-central") } + maven { setUrl("https://cache-redirector.jetbrains.com/dl.bintray.com/kotlin/kotlin-eap") } } resolutionStrategy { eachPlugin { @@ -17,6 +17,6 @@ pluginManagement { } } -rootProject.name = 'ReSharperPlugin.ODataCliUi' +rootProject.name = "ReSharperPlugin.ODataCliUi" -include ':protocol' +include(":protocol")