Skip to content

Commit

Permalink
0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
squid233 committed Sep 16, 2023
0 parents commit 242d0cd
Show file tree
Hide file tree
Showing 26 changed files with 1,534 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
root = true

[*]
charset = utf-8
indent_size = 4
indent_style = space
trim_trailing_whitespace = true
end_of_line = lf
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false

[*.{yml,json}]
indent_size = 2
42 changes: 42 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/.idea/workspace.xml
/.idea/usage.statistics.xml
/nbproject/private/
/bin
/wiki
.DS_Store
*.bat
*.conf
*.dll
*.dylib
*.jar
*.jpg
*.mhr
*.obj
*.ogg
*.sh
*.so
*.ttf
*.wav
*.zip
touch.txt

.gradle
build/

# Ignore Gradle GUI config
gradle-app.setting

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar
!gradlew.bat

# Cache of project
.gradletasknamecache

# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
# gradle/wrapper/gradle-wrapper.properties

.idea/
out/

run/
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Overrun Organization

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Pooling

Object pools for multi-threading.
167 changes: 167 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
plugins {
java
idea
signing
`maven-publish`
}

val projGroupId: String by rootProject
val projArtifactId: String by rootProject
val projName: String by rootProject
val projVersion: String by rootProject
val projDesc: String by rootProject
val projVcs: String by rootProject
val projBranch: String by rootProject
val orgName: String by rootProject
val orgUrl: String by rootProject
val developers: String by rootProject

group = projGroupId
version = projVersion

repositories {
mavenCentral()
maven { url = uri("https://maven.aliyun.com/repository/central") }
// temporary maven repositories
maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots") }
maven { url = uri("https://s01.oss.sonatype.org/content/repositories/releases") }
maven { url = uri("https://s01.oss.sonatype.org/content/repositories/snapshots") }
}

dependencies {
testImplementation(platform("org.junit:junit-bom:5.10.0"))
testImplementation("org.junit.jupiter:junit-jupiter")
}

tasks.test {
useJUnitPlatform()
}

val targetJavaVersion = 17
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible) {
options.release.set(targetJavaVersion)
}
}

java {
val javaVersion = JavaVersion.toVersion(targetJavaVersion)
if (JavaVersion.current() < javaVersion) {
toolchain.languageVersion.set(JavaLanguageVersion.of(targetJavaVersion))
}
withJavadocJar()
withSourcesJar()
}

tasks.named<Javadoc>("javadoc") {
isFailOnError = false
options {
encoding = "UTF-8"
locale = "en_US"
windowTitle = "$projName $projVersion Javadoc"
if (this is StandardJavadocDocletOptions) {
charSet = "UTF-8"
isAuthor = true
links("https://docs.oracle.com/en/java/javase/$targetJavaVersion/docs/api/")
}
}
}

tasks.named<Jar>("jar") {
manifestContentCharset = "utf-8"
metadataCharset = "utf-8"
from("LICENSE")
manifest.attributes(
"Specification-Title" to projName,
"Specification-Vendor" to orgName,
"Specification-Version" to "0",
"Implementation-Title" to projName,
"Implementation-Vendor" to orgName,
"Implementation-Version" to archiveVersion
)
archiveBaseName.set(projArtifactId)
}

tasks.named<Jar>("sourcesJar") {
dependsOn(tasks["classes"])
archiveClassifier.set("sources")
// from(sourceSets.main.allSource, "LICENSE")
}

tasks.named<Jar>("javadocJar") {
val javadoc by tasks
dependsOn(javadoc)
archiveClassifier.set("javadoc")
from(javadoc, "LICENSE")
}

artifacts {
archives(tasks["javadocJar"])
archives(tasks["sourcesJar"])
}

publishing.publications {
register<MavenPublication>("mavenJava") {
groupId = projGroupId
artifactId = projArtifactId
version = projVersion
description = projDesc
from(components["java"])
pom {
name = projName
description = projDesc
url.set("https://github.com/$projVcs")
licenses {
license {
name.set("MIT")
url.set("https://raw.githubusercontent.com/$projVcs/$projBranch/LICENSE")
}
}
organization {
name = orgName
url = orgUrl
}
developers {
val prop = developers.split(',')
prop.map { it.split(':', limit = 3) }
.forEach {
developer {
id.set(it[0])
name.set(it[1])
email.set(it[2])
}
}
}
scm {
connection.set("scm:git:https://github.com/${projVcs}.git")
developerConnection.set("scm:git:https://github.com/${projVcs}.git")
url.set("https://github.com/${projVcs}.git")
}
}
}
}
// You have to add 'OSSRH_USERNAME', 'OSSRH_PASSWORD', 'signing.keyId',
// 'signing.password' and 'signing.secretKeyRingFile' to
// GRADLE_USER_HOME/gradle.properties
publishing.repositories {
maven {
name = "OSSRH"
credentials {
username = project.findProperty("OSSRH_USERNAME").toString()
password = project.findProperty("OSSRH_PASSWORD").toString()
}
url = uri(
if (projVersion.endsWith("-SNAPSHOT"))
"https://s01.oss.sonatype.org/content/repositories/snapshots/"
else "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
)
}
}

signing {
if (!projVersion.endsWith("-SNAPSHOT") && System.getProperty("gpg.signing", "true").toBoolean())
sign(publishing.publications["mavenJava"])
}

idea.module.inheritOutputDirs = true
17 changes: 17 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
org.gradle.jvmargs=-Dfile.encoding=UTF-8

# Project information
projGroupId=io.github.over-run
projArtifactId=pooling
projName=pooling
projVersion=0.1.0
projDesc=Object pools for multi-threading
projVcs=Over-Run/pooling
projBranch=0.x

# Organization
orgName=Overrun Organization
orgUrl=https://over-run.github.io/

# Developers
developers=squid233:squid233:[email protected]
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 6 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#Sun Sep 10 08:58:22 CST 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 242d0cd

Please sign in to comment.