From f17e8b16e350e20c9b2f68981fb3b5bc168dcbb1 Mon Sep 17 00:00:00 2001 From: Oleh Dokuka Date: Wed, 18 Dec 2024 18:51:03 +0200 Subject: [PATCH] add fixes --- .github/workflows/ci.yml | 4 +- .github/workflows/publish.yml | 4 +- .../build.gradle.kts | 48 +++++++++++-------- .../main/resources/node-server/package.json | 7 +++ .../src/main/resources/META-INF/package.json | 17 +------ 5 files changed, 40 insertions(+), 40 deletions(-) create mode 100644 rewrite-javascript-remote-server/src/main/resources/node-server/package.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1f1d192a..7a0cfe28 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,9 +59,9 @@ jobs: - name: npm install embedded run: | npm install @openrewrite/rewrite-remote - npm install ../../../../openrewrite/openrewrite-rewrite-*.tgz + npm install ../../../../../openrewrite/openrewrite-rewrite-*.tgz git checkout HEAD -- package.json - working-directory: rewrite-javascript-remote-server/src/main/resources + working-directory: rewrite-javascript-remote-server/src/main/resources/node-server - name: publish-java-snapshots if: github.event_name != 'pull_request' diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9a3b274e..6f0b4d7e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -78,9 +78,9 @@ jobs: - name: npm install embedded run: | npm install @openrewrite/rewrite-remote - npm install ../../../../openrewrite/openrewrite-rewrite-*.tgz + npm install ../../../../../openrewrite/openrewrite-rewrite-*.tgz git checkout HEAD -- package.json - working-directory: rewrite-javascript-remote-server/src/main/resources + working-directory: rewrite-javascript-remote-server/src/main/resources/node-server - name: publish-candidate if: contains(github.ref, '-rc.') diff --git a/rewrite-javascript-remote-server/build.gradle.kts b/rewrite-javascript-remote-server/build.gradle.kts index ce31894c..1bc08387 100644 --- a/rewrite-javascript-remote-server/build.gradle.kts +++ b/rewrite-javascript-remote-server/build.gradle.kts @@ -4,6 +4,29 @@ plugins { id("org.openrewrite.build.language-library") } + +val latest = if (project.hasProperty("releasing")) "latest.release" else "latest.integration" +dependencies { + + implementation(project(":rewrite-javascript")) + implementation(project(":rewrite-javascript-remote")) + implementation(platform("org.openrewrite:rewrite-bom:$latest")) + implementation("org.openrewrite:rewrite-java") + implementation("org.openrewrite:rewrite-remote:$latest") { + exclude(group = "org.openrewrite", module = "rewrite-javascript") + } + + compileOnly("org.assertj:assertj-core:latest.release") + testImplementation("org.assertj:assertj-core:latest.release") + testImplementation("org.junit.jupiter:junit-jupiter-api:latest.release") + testImplementation("org.junit.jupiter:junit-jupiter-params:latest.release") + testImplementation("org.openrewrite:rewrite-test") + testImplementation("org.openrewrite.recipe:rewrite-static-analysis:${latest}") + testImplementation("org.junit-pioneer:junit-pioneer:2.0.0") + + testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:latest.release") +} + tasks.clean { delete(projectDir.resolve("src/main/resources/package-lock.json")) delete(projectDir.resolve("src/main/resources/node_modules")) @@ -17,25 +40,10 @@ tasks.withType { include("*.java") } -// We don't care about publishing javadocs anywhere, so don't waste time building them -tasks.withType().configureEach { - enabled = false -} - -tasks.named("sourcesJar") { - enabled = false -} - -tasks.named("javadocJar") { - enabled = false -} - -val emptySourceJar = tasks.create("emptySourceJar") { - file("README.md") - archiveClassifier.set("sources") -} -val emptyJavadocJar = tasks.create("emptyJavadocJar") { - file("README.md") - archiveClassifier.set("javadoc") +tasks.withType { + options { + this as CoreJavadocOptions + addStringOption("Xdoclint:none", "-quiet") + } } diff --git a/rewrite-javascript-remote-server/src/main/resources/node-server/package.json b/rewrite-javascript-remote-server/src/main/resources/node-server/package.json new file mode 100644 index 00000000..3dbb2881 --- /dev/null +++ b/rewrite-javascript-remote-server/src/main/resources/node-server/package.json @@ -0,0 +1,7 @@ +{ + "name": "@openrewrite/rewrite-bundled-starter", + "version": "1.0.0", + "description": "", + "dependencies": { + } +} diff --git a/rewrite-javascript/src/main/resources/META-INF/package.json b/rewrite-javascript/src/main/resources/META-INF/package.json index 3d617be4..4210e0ab 100644 --- a/rewrite-javascript/src/main/resources/META-INF/package.json +++ b/rewrite-javascript/src/main/resources/META-INF/package.json @@ -1,24 +1,9 @@ -/** - * Copyright 2024 the original author or authors. - *

- * Licensed under the Moderne Source Available License (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - *

- * https://docs.moderne.io/licensing/moderne-source-available-license - *

- * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ { "name": "@openrewrite/rewrite-bundled-starter", "version": "1.0.0", "description": "", "dependencies": { - "@openrewrite/rewrite-remote": "~0.5.0", + "@openrewrite/rewrite-remote": "~0.13.0", "@openrewrite/rewrite": "~0.25.0" }, "devDependencies": {