Skip to content

Commit

Permalink
Initial
Browse files Browse the repository at this point in the history
  • Loading branch information
R0bbyYT committed Jun 19, 2022
0 parents commit 0b85b21
Show file tree
Hide file tree
Showing 36 changed files with 2,053 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/gradle-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Java CI with Gradle

on:
push:
tags:
- '**'

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 8
uses: actions/setup-java@v1
with:
java-version: 8

- name: Get tag name
id: get_tag_name
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Configure gradle
run: ./gradlew

- name: Check License
run: ./gradlew checkLicense --full-stacktrace

- name: Build with Gradle
run: ./gradlew build --full-stacktrace

- name: Run tests
run: ./gradlew test --full-stacktrace

- name: Publish to box
run: ./gradlew publish --full-stacktrace
env:
VERSION: ${{ steps.get_tag_name.outputs.VERSION }}
PUBLISH_TOKEN: ${{ secrets.BOX_PUBLISH_TOKEN }}
22 changes: 22 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# eclipse
bin
*.launch
.settings
.metadata
.classpath
.project

# idea
out
*.ipr
*.iws
*.iml
.idea

# gradle
build
.gradle

# other
eclipse
run
19 changes: 19 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2022 BurgerbudeORG <https://burgerbude.org/>

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.
46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
A smaller library with useful functional interfaces.

### Gradle

#### groovy
```groovy
repositories {
maven {
url = "https://maven.burgerbude.org/api/v1/maven/"
}
}
dependencies {
implementation "org.burgerbude:function:0.1.0"
}
```

#### kts
```kotlin
repositories {
maven("https://maven.burgerbude.org/api/v1/maven/")
}

dependencies {
implementation("org.burgerbude:function:0.1.0")
}
```

### Maven
```html
<repositores>
<repository>
<id>Burgerbude</id>
<url>https://maven.burgerbude.org/api/v1/maven/</url>
</repository>
</repositores>

<dependencies>
<dependency>
<groupId>org.burgerbude</groupId>
<artifactId>function</artifactId>
<version>0.1.0</version>
</dependency>
</dependencies>

```
55 changes: 55 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
plugins {
id("java")
id("maven-publish")
id("net.kyori.indra.license-header") version "2.1.1"
}

group = "org.burgerbude.libraries"
version = System.getenv().getOrDefault("VERSION", "0.0.0")

repositories {
mavenCentral()
}

java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
withSourcesJar()
}

dependencies {
testImplementation("org.junit.jupiter:junit-jupiter-api:5.8.2")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.8.2")
}

tasks.getByName<Test>("test") {
useJUnitPlatform()
}

publishing {
publications {
create<MavenPublication>("maven") {
groupId = project.group.toString();
artifactId = project.name;
version = project.version.toString();

from(components["java"])
}

repositories {
maven("https://maven.burgerbude.org/api/v1/maven/upload") {
name = "burgerbude"

authentication {
create<HttpHeaderAuthentication>("header")
}

credentials(HttpHeaderCredentials::class) {
name = "Publish-Token"
value = System.getenv("PUBLISH_TOKEN")
}
}
}
}

}
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.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 0b85b21

Please sign in to comment.