Skip to content
This repository was archived by the owner on Sep 2, 2024. It is now read-only.

Commit

Permalink
v4.0.1
Browse files Browse the repository at this point in the history
format
gradle
  • Loading branch information
nothub committed Sep 24, 2022
1 parent ce14a55 commit 4ddaa5a
Show file tree
Hide file tree
Showing 17 changed files with 513 additions and 262 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* text=auto eol=lf
*.jar binary
4 changes: 1 addition & 3 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
version: 2
updates:

- package-ecosystem: "maven"
- package-ecosystem: "gradle"
directory: "/"
schedule:
interval: "daily"
assignees:
- "nothub"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
Expand Down
44 changes: 0 additions & 44 deletions .github/workflows/verify.yaml

This file was deleted.

20 changes: 20 additions & 0 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: '🚔'
on: push
jobs:
job:
name: 'Java ${{ matrix.java }}'
runs-on: 'ubuntu-22.04'
strategy:
matrix:
java: [ 8, 11, 17 ]
fail-fast: true
steps:
- uses: actions/checkout@v3
- uses: gradle/wrapper-validation-action@v1
- uses: actions/setup-java@v3
with:
java-version: '${{ matrix.java }}'
distribution: 'temurin'
check-latest: true
cache: 'gradle'
- run: 'make verify'
20 changes: 15 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
*
!*/

!/.github/**
!/src/**
!/.mvn/**

!/*.md
!/Makefile

!/build.gradle
!/settings.gradle
!/gradle/wrapper/gradle-wrapper.jar
!/gradle/wrapper/gradle-wrapper.properties
!/gradlew
!/gradlew.bat

!/LICENSE.txt
!/README.md

!/.editorconfig
!/.gitattributes
!/.gitignore
!/LICENSE
!/pom.xml

!/.github/**/*.yaml
4 changes: 0 additions & 4 deletions .mvn/jvm.config

This file was deleted.

File renamed without changes.
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FLAGS = --console plain --full-stacktrace

.PHONY: verify
verify:
./gradlew $(FLAGS) check

.PHONY: publish
publish:
./gradlew $(FLAGS) publishToSonatype closeAndReleaseStagingRepository
105 changes: 105 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
import org.gradle.process.internal.ExecException

plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
id 'io.github.gradle-nexus.publish-plugin' version '1.1.0'
}

group = 'lol.hub'
version = { ->
def pattern = 'v[0-9]*'
def fallback = 'indev'
def result = new ByteArrayOutputStream()
try {
exec {
commandLine 'git', 'describe', '--tags', '--abbrev=0', '--match', pattern
ignoreExitValue = true
standardOutput = result
// void stderr
errorOutput = new OutputStream() {
@Override
void write(int b) throws IOException {}
}
}
} catch (ExecException ignored) {
ignored.printStackTrace()
println 'No git tag found with format \'' + pattern + '\', using fallback version identifier \'' + fallback + '\'.'
return fallback
}
return result.toString().trim().replaceFirst('v', '')
}()

repositories {
mavenCentral()
maven { url = uri('https://repo.maven.apache.org/maven2/') }
}

dependencies {
compileOnly group: 'org.jetbrains', name: 'annotations', version: '23.0.0'
testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.9.1'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.9.1'
testImplementation group: 'net.jodah', name: 'concurrentunit', version: '0.4.6'
}

java {
toolchain.languageVersion = JavaLanguageVersion.of(17)
withJavadocJar()
withSourcesJar()
}

javadoc {
options.addBooleanOption('html5', true)
}

tasks.withType(JavaCompile).configureEach {
it.options.encoding = 'UTF-8'
}

test {
useJUnitPlatform()
}

publishing {
publications {
mavenJava(MavenPublication) {
from components.java
pom {
name = project.name
description = 'Tiny and fast pubsub implementation with subscriber priorities and event canceling for Java 8, 11 and 17.'
url = 'https://github.com/nothub/TinyEventBus'
licenses {
license {
name = 'MIT License'
url = 'https://raw.githubusercontent.com/nothub/TinyEventBus/master/LICENSE.txt'
}
}
developers {
developer {
name = 'hub'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:git://github.com/nothub/TinyEventBus.git'
developerConnection = 'scm:git:ssh://github.com/nothub/TinyEventBus.git'
url = 'https://github.com/nothub/TinyEventBus'
}
}
}
}
}

signing {
sign publishing.publications.mavenJava
}

nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
}
}
}
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 4ddaa5a

Please sign in to comment.