Skip to content

Commit

Permalink
Merge pull request #19 from ortus-boxlang/development
Browse files Browse the repository at this point in the history
Beta 16
  • Loading branch information
jclausen authored Sep 27, 2024
2 parents e461fda + 20cd364 commit 894a2f4
Show file tree
Hide file tree
Showing 5 changed files with 165 additions and 4 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,18 @@ jobs:
SOURCE_DIR: "build/docs/javadoc"
DEST_DIR: "boxlang-runtimes/${{ env.MODULE_ID }}/${{ env.VERSION }}"

# - name: Publish to Maven Central
# 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: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,6 @@ jobs:
permissions:
checks: write
contents: write
packages: write
with:
snapshot: true
144 changes: 144 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

/**
Expand Down Expand Up @@ -65,6 +69,7 @@ dependencies {

java {
withJavadocJar()
withSourcesJar()
}

compileJava {
Expand Down Expand Up @@ -100,6 +105,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,
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down

0 comments on commit 894a2f4

Please sign in to comment.