Skip to content

Commit

Permalink
release: Basic implementation (1.0.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
lilmayu committed May 15, 2024
1 parent 8e2a803 commit 563d66b
Show file tree
Hide file tree
Showing 26 changed files with 1,528 additions and 1 deletion.
43 changes: 43 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

### IntelliJ IDEA ###
.idea/modules.xml
.idea/jarRepositories.xml
.idea/compiler.xml
.idea/libraries/
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/

### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

### VS Code ###
.vscode/

### Mac OS ###
.DS_Store
.idea/
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,14 @@
# console-parallax
# Console Parallax
A simple Java library handling console input and treating it as a CLI.

It is designed to be quickly used, without any fuss and large amount of code or reading.

With the magic of annotations and without. ***It is up to you.***

## TODOs
- Tests
- Docs
- help command (help [cmd])
- Bonuses:
- Annotations
- Advanced command parser (--help, --name="some-value", etc.)
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'
id 'java-library'
id 'signing'
id 'maven-publish'
id "com.github.johnrengelman.shadow" version "8.1.1"
id "io.github.gradle-nexus.publish-plugin" version "1.1.0"
id 'jacoco'
id 'jacoco-report-aggregation'
}

group = 'dev.mayuna'
version = '1.0.0'

repositories {
mavenCentral()
}

dependencies {
// Jetbrains Annotations
implementation 'org.jetbrains:annotations:24.0.0'

// Lombok
compileOnly 'org.projectlombok:lombok:1.18.+'
annotationProcessor 'org.projectlombok:lombok:1.18.+'
testCompileOnly 'org.projectlombok:lombok:1.18.+'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.+'

testImplementation platform('org.junit:junit-bom:5.10.0')
testImplementation 'org.junit.jupiter:junit-jupiter'
}

// Java 8
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
}
}

tasks.jacocoTestReport {
reports {
csv.required = true
}
}

// == Quick tasks == //

task publishCloseAndRelease() {
dependsOn 'publishToSonatype'
dependsOn 'closeAndReleaseSonatypeStagingRepository'
}

shadowJar {

}

test {
useJUnitPlatform()
finalizedBy jacocoTestReport
}

// == Maven publishing == //

publishing {

publications {
shadow(MavenPublication) {
groupId = 'dev.mayuna'
artifactId = 'console-parallax'
version = getVersion()
from components.java

pom {
name = 'console-parallax'
description = 'A simple Java library handling console input and treating it as a CLI'
url = 'https://github.com/lilmayu/console-parallax'

scm {
connection = 'scm:https://github.com/lilmayu/console-parallax'
developerConnection = 'scm:git:https://github.com/lilmayu/console-parallax.git'
url = 'https://github.com/lilmayu/console-parallax'
}

licenses {
license {
name = 'MIT License'
url = 'https://opensource.org/license/MIT'
}
}

developers {
developer {
id = 'mayuna'
name = 'Marek Lof'
email = '[email protected]'
}
}
}
}
}

publishing {
repositories {
maven {
credentials {
username = "$ossrhUsername"
password = "$ossrhPassword"
}

url = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
}
}
}
}

signing {
sign publishing.publications.shadow
}

nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
username = "$ossrhUsername"
password = "$ossrhPassword"
}
}
}

java {
withJavadocJar()
withSourcesJar()
}

shadowJar.dependsOn javadocJar
shadowJar.dependsOn sourcesJar
shadowJar.dependsOn jar

components.java.withVariantsFromConfiguration(configurations.shadowRuntimeElements) {
skip()
}
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 @@
#Wed May 15 15:13:59 CEST 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 563d66b

Please sign in to comment.