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": {