This repository was archived by the owner on Sep 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
format gradle
- Loading branch information
Showing
17 changed files
with
513 additions
and
262 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* text=auto eol=lf | ||
*.jar binary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.