Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
squid233 committed Mar 3, 2023
0 parents commit dd00d17
Show file tree
Hide file tree
Showing 14 changed files with 647 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.
142 changes: 142 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
plugins {
id 'java-library'
id 'idea'
id 'signing'
id 'maven-publish'
}

group projGroupId
version = projVersion

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

dependencies {
}

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

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

javadoc {
failOnError = false
options.encoding 'UTF-8'
options.charSet 'UTF-8'
options.author true
options.locale 'en_US'
options.links "https://docs.oracle.com/en/java/javase/$sourceCompatibility/docs/api/"
options.windowTitle "$projName $projVersion Javadoc"
}

jar {
manifestContentCharset 'utf-8'
metadataCharset 'utf-8'
from 'LICENSE'
manifest.attributes(
'Specification-Title': projName,
'Specification-Vendor': orgName,
'Specification-Version': '0',
'Implementation-Title': projName,
'Implementation-Vendor': orgName,
'Implementation-Version': archiveVersion
)
}

sourcesJar {
dependsOn classes
archiveClassifier.set 'sources'
from sourceSets.main.allSource, 'LICENSE'
}

javadocJar {
dependsOn javadoc
archiveClassifier.set 'javadoc'
from javadoc, 'LICENSE'
}

artifacts {
archives javadocJar, sourcesJar
}

publishing.publications {
register('mavenJava', MavenPublication) {
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 {
String[] prop = (project.developers as String).split(',')
for (String s : prop) {
String[] dev = s.split(':', 3)
developer {
id.set dev[0]
name.set dev[1]
email.set dev[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") ?: "null"
password = project.findProperty("OSSRH_PASSWORD") ?: "null"
}
url = version.endsWith('-SNAPSHOT')
? "https://s01.oss.sonatype.org/content/repositories/snapshots/"
: "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
}
}

signing {
if (!version.endsWith('-SNAPSHOT') && Boolean.parseBoolean(System.getProperty("gpg.signing", "true")))
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=unifont
projName=unifont
projVersion=15.0.01
projDesc=Java Unifont binding
projVcs=Over-Run/unifont
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 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit dd00d17

Please sign in to comment.