From 18353026ae6584cde9b10e8868fb51480a33046d Mon Sep 17 00:00:00 2001 From: Github Actions Date: Fri, 20 Sep 2024 13:05:54 +0000 Subject: [PATCH 1/5] Version bump --- changelog.md | 6 +++++- gradle.properties | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/changelog.md b/changelog.md index e59e146..3d01ac2 100644 --- a/changelog.md +++ b/changelog.md @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.0.0-beta15] - 2024-09-20 + ## [1.0.0-beta14] - 2024-09-13 ## [1.0.0-beta13] - 2024-09-06 @@ -39,7 +41,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - First iteration of this runtime -[Unreleased]: https://github.com/ortus-boxlang/boxlang-servlet/compare/v1.0.0-beta14...HEAD +[Unreleased]: https://github.com/ortus-boxlang/boxlang-servlet/compare/v1.0.0-beta15...HEAD + +[1.0.0-beta15]: https://github.com/ortus-boxlang/boxlang-servlet/compare/v1.0.0-beta14...v1.0.0-beta15 [1.0.0-beta14]: https://github.com/ortus-boxlang/boxlang-servlet/compare/v1.0.0-beta13...v1.0.0-beta14 diff --git a/gradle.properties b/gradle.properties index ca8dd7d..484b1d5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ -#Fri Sep 13 11:29:06 UTC 2024 -boxlangVersion=1.0.0-beta15 +#Fri Sep 20 13:05:51 UTC 2024 +boxlangVersion=1.0.0-beta16 jdkVersion=21 -version=1.0.0-beta15 +version=1.0.0-beta16 group=ortus.boxlang From ea882a89c475a51f876c0d748375d2fd956307f6 Mon Sep 17 00:00:00 2001 From: Brad Wood Date: Mon, 23 Sep 2024 20:16:11 -0500 Subject: [PATCH 2/5] BL-593 --- .../ortus/boxlang/web/exchange/BoxHTTPServletExchange.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/ortus/boxlang/web/exchange/BoxHTTPServletExchange.java b/src/main/java/ortus/boxlang/web/exchange/BoxHTTPServletExchange.java index 8b62eac..a112037 100644 --- a/src/main/java/ortus/boxlang/web/exchange/BoxHTTPServletExchange.java +++ b/src/main/java/ortus/boxlang/web/exchange/BoxHTTPServletExchange.java @@ -172,6 +172,12 @@ public void addResponseHeader( String name, String value ) { @Override public void flushResponseBuffer() { try { + + var contentType = getResponseHeader( "Content-Type" ); + if ( contentType == null || contentType.isEmpty() ) { + setResponseHeader( "Content-Type", "text/html;charset=UTF-8" ); + } + response.flushBuffer(); } catch ( IOException e ) { throw new BoxRuntimeException( "Could not flush response buffer", e ); From 10f7d1ff8c8b37fe0af887b2b9ebdb79f629a546 Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Thu, 26 Sep 2024 05:03:33 +0200 Subject: [PATCH 3/5] maven publish --- .github/workflows/release.yml | 14 +++- .github/workflows/snapshot.yml | 1 + build.gradle | 143 +++++++++++++++++++++++++++++++++ 3 files changed, 156 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cdcba10..9fd899e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -159,8 +159,18 @@ jobs: SOURCE_DIR: "build/docs/javadoc" DEST_DIR: "boxlang-runtimes/${{ env.MODULE_ID }}/${{ env.VERSION }}" - # - name: Publish to Maven Central - # run: | + # Publish to Maven Central + Github ONLY on Beta/Final Releases + - name: Publish Package (Maven+Github) + if: env.SNAPSHOT == 'false' + run: | + gradle publish --no-daemon --no-parallel + gradle publishToSonatype closeAndReleaseSonatypeStagingRepository + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GPG_KEY: ${{ secrets.GPG_KEY }} + GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }} + MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} - name: Publish to ForgeBox run: | diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index 005c4a1..927756a 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -71,5 +71,6 @@ jobs: permissions: checks: write contents: write + packages: write with: snapshot: true diff --git a/build.gradle b/build.gradle index da7267d..7eebc29 100644 --- a/build.gradle +++ b/build.gradle @@ -18,6 +18,10 @@ plugins { id "de.undercouch.download" version "5.6.0" // Task visualizer id "com.dorongold.task-tree" version "4.0.0" + // Maven Publisher + id 'maven-publish' + id 'signing' + id 'com.gradleup.nmcp' version "0.0.9" } /** @@ -100,6 +104,145 @@ shadowJar { } build.dependsOn( shadowJar ); +/** + * Publish the artifacts to the local maven repository + */ +publishing { + publications { + shadow( MavenPublication ) { publication -> + artifact shadowJar + artifact javadocJar + artifact sourcesJar + + // This is the only one sonatype accepts, not ortus.boxlang + // https://central.sonatype.com/ + groupId = 'io.boxlang' + artifactId = 'boxlang-servlet' + pom { + name = "BoxLang Servlet Runtime" + description = "BoxLang is a dynamic multi-runtime JVM Language based on fluency and functional constructs. This is the Servlet Runtime for BoxLang." + url = "https://boxlang.io" + issueManagement { + system = "Jira" + url = "https://ortussolutions.atlassian.net/jira/software/c/projects/BL/issues" + } + mailingLists { + mailingList { + name = "BoxLang Community" + subscribe = "https://community.ortussolutions.com/c/boxlang/42" + unsubscribe = "https://community.ortussolutions.com/c/boxlang/42" + } + } + licenses { + license { + name = 'The Apache License, Version 2.0' + url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' + } + } + scm { + connection = 'scm:git:https://github.com/ortus-boxlang/boxlang.git' + developerConnection = 'scm:git:ssh://github.com/ortus-boxlang/boxlang.git' + url = 'https://github.com/ortus-boxlang/boxlang' + } + developers{ + developer { + id = "lmajano" + name = "Luis Majano" + email = "lmajano@ortussolutions.com" + organization = "Ortus Solutions, Corp" + organizationUrl = "https://www.ortussolutions.com" + } + developer { + id = "bdw429s" + name = "Brad Wood" + email = "brad@ortussolutions.com" + organization = "Ortus Solutions, Corp" + organizationUrl = "https://www.ortussolutions.com" + } + developer { + id = "jclausen" + name = "Jon Clausen" + email = "jclausen@ortussolutions.com" + organization = "Ortus Solutions, Corp" + organizationUrl = "https://www.ortussolutions.com" + } + developer { + id = "michaelborn" + name = "Michael Born" + email = "michael@ortussolutions.com" + organization = "Ortus Solutions, Corp" + organizationUrl = "https://www.ortussolutions.com" + } + developer { + id = "garciadev" + name = "Daniel Garcia" + email = "dgarcia@ortussolutions.com" + organization = "Ortus Solutions, Corp" + organizationUrl = "https://www.ortussolutions.com" + } + developer { + id = "jbeers" + name = "Jacob Beers" + email = "jbeers@ortussolutions.com" + organization = "Ortus Solutions, Corp" + organizationUrl = "https://www.ortussolutions.com" + } + developer { + id = "gpickin" + name = "Gavin Pickin" + email = "gavin@ortussolutions.com" + organization = "Ortus Solutions, Corp" + organizationUrl = "https://www.ortussolutions.com" + } + developer { + id = "ericpeterson" + name = "Eric Peterson" + email = "eric@ortussolutions.com" + organization = "Ortus Solutions, Corp" + organizationUrl = "https://www.ortussolutions.com" + } + } + } + } + } + + repositories { + maven { + name = 'local-repo' + url = layout.buildDirectory.dir( "repo" ) + } + maven { + name = "GitHubPackages" + url = "https://maven.pkg.github.com/ortus-boxlang/boxlang" + credentials { + username = System.getenv( "GITHUB_ACTOR" ) + password = System.getenv( "GITHUB_TOKEN" ) + } + } + } +} + +nmcp { + publishAllProjectsProbablyBreakingProjectIsolation { + username = System.getenv( "MAVEN_USERNAME" ) ?: project.findProperty( "maven_username" ) + password = System.getenv( "MAVEN_PASSWORD" ) ?: project.findProperty( "maven_password" ) + // publish manually from the portal + //publicationType = "USER_MANAGED" + // or if you want to publish automatically + publicationType = "AUTOMATIC" + } +} + +/** + * Digital Signing of assets + */ +signing { + def signingKey = System.getenv("GPG_KEY") ?: project.findProperty("signing.keyId") + def signingPassword = System.getenv("GPG_PASSWORD") ?: project.findProperty("signing.password") + useInMemoryPgpKeys(signingKey, signingPassword) + sign publishing.publications.shadow +} + /** * Docs are here: * - https://github.com/harbby/gradle-serviceloader, From 7d32e31e01f6265c03c1816b433b77f67dc97d4d Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Thu, 26 Sep 2024 10:08:23 +0200 Subject: [PATCH 4/5] sources jar missing --- build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/build.gradle b/build.gradle index 7eebc29..4c61fc4 100644 --- a/build.gradle +++ b/build.gradle @@ -69,6 +69,7 @@ dependencies { java { withJavadocJar() + withSourcesJar() } compileJava { From 20cd364a341ef04ecc699782c96b3eecec959161 Mon Sep 17 00:00:00 2001 From: Jon Clausen Date: Fri, 27 Sep 2024 16:17:51 -0400 Subject: [PATCH 5/5] Disable maven publishing --- .github/workflows/release.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9fd899e..7828292 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -160,17 +160,17 @@ jobs: DEST_DIR: "boxlang-runtimes/${{ env.MODULE_ID }}/${{ env.VERSION }}" # Publish to Maven Central + Github ONLY on Beta/Final Releases - - name: Publish Package (Maven+Github) - if: env.SNAPSHOT == 'false' - run: | - gradle publish --no-daemon --no-parallel - gradle publishToSonatype closeAndReleaseSonatypeStagingRepository - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GPG_KEY: ${{ secrets.GPG_KEY }} - GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }} - MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} - MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} + # - name: Publish Package (Maven+Github) + # if: env.SNAPSHOT == 'false' + # run: | + # gradle publish --no-daemon --no-parallel + # gradle publishToSonatype closeAndReleaseSonatypeStagingRepository + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # GPG_KEY: ${{ secrets.GPG_KEY }} + # GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }} + # MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} + # MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} - name: Publish to ForgeBox run: |