Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
# Conflicts:
#	gradle/wrapper/gradle-wrapper.properties
#	settings.gradle.kts
  • Loading branch information
elect86 committed Nov 3, 2023
2 parents a89b28e + b73b365 commit 1a44fc3
Show file tree
Hide file tree
Showing 9 changed files with 409 additions and 290 deletions.
125 changes: 40 additions & 85 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,98 +1,53 @@
name: build

on: [ push ]
name: Gradle CI

on:
push:
branches: [ master ]
paths-ignore: [ "**.md", "schemas/**", ".editorconfig", ".gitignore", ".gitattributes" ]
pull_request:
branches: [ master ]
paths-ignore: [ "**.md", "schemas/**", ".editorconfig", ".gitignore", ".gitattributes" ]
create:
tags:

jobs:

linux:
name: 'Linux'
runs-on: ubuntu-latest

gradle:
runs-on: "ubuntu-latest"
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- uses: gradle/wrapper-validation-action@v1
- name: Set up JDK 1.8
uses: actions/setup-java@v3

- uses: actions/setup-java@v3
with:
distribution: temurin
distribution: zulu
java-version: 8
- name: Grant execute permission for gradlew
run: chmod +x gradlew
# - name: Build with Gradle
# run: ./gradlew build -x dokkaHtml -x dokkaHtmlJar
- uses: burrunan/gradle-cache-action@v1
name: Build
with:
arguments: assemble #-x dokkaHtml -x dokkaHtmlJar -x javadoc -x dokkaJavadocJar
# - name: Cleanup Gradle Cache
# # Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
# # Restoring these files from a GitHub Actions cache might cause problems for future builds.
# run: |
# rm -f ~/.gradle/caches/modules-2/modules-2.lock
# rm -f ~/.gradle/caches/modules-2/gc.properties
# - name: Show Working directory content
# run: ls
# - uses: actions/checkout@master
# with:
# repository: kotlin-graphics/mary
# path: ./mary
- name: Show ../.. directory content
run: ls ../..
# - name: move mary up
# run: mv ./mary ../..
# - name: Show Working directory content
# run: ls
# - name: Show ../.. directory content
# run: ls ../..

windows:
name: 'Windows'
runs-on: windows-latest
- name: Setup Gradle
uses: gradle/gradle-build-action@v2

steps:
- uses: actions/checkout@v3
- uses: gradle/wrapper-validation-action@v1
- name: Set up JDK 1.8
uses: actions/setup-java@v3
- name: Setup Gradle Dependencies Cache
uses: actions/cache@v3
with:
distribution: temurin
java-version: 8
# - name: Build with Gradle
# run: .\gradlew.bat build -x dokkaHtml -x dokkaHtmlJar
- uses: burrunan/gradle-cache-action@v1
name: Build
with:
arguments: assemble #-x dokkaHtml -x dokkaHtmlJar -x javadoc -x dokkaJavadocJar
# - name: Cleanup Gradle Cache
# # Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
# # Restoring these files from a GitHub Actions cache might cause problems for future builds.
# run: |
# rm -f ~/.gradle/caches/modules-2/modules-2.lock
# rm -f ~/.gradle/caches/modules-2/gc.properties
path: ~/.gradle/caches
key: gradle-caches-${{ hashFiles('**/*.gradle', '**/*.gradle.kts', 'gradle.properties') }}

mac:
name: 'Mac OS'
runs-on: macos-latest

steps:
- uses: actions/checkout@v3
- uses: gradle/wrapper-validation-action@v1
- name: Set up JDK 1.8
uses: actions/setup-java@v3
- name: Setup Gradle Wrapper Cache
uses: actions/cache@v3
with:
distribution: temurin
java-version: 8
- name: Grant execute permission for gradlew
run: chmod +x gradlew
# - name: Build with Gradle
# run: ./gradlew build -x dokkaHtml -x dokkaHtmlJar
- uses: burrunan/gradle-cache-action@v1
name: Build
path: ~/.gradle/wrapper
key: gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}

- name: Build
uses: gradle/gradle-build-action@v2
with:
arguments: assemble
- name: Test
uses: gradle/gradle-build-action@v2
with:
arguments: check
- name: Publish
if: startsWith(github.ref, 'refs/tags/v')
uses: gradle/gradle-build-action@v2
with:
arguments: assemble #-x dokkaHtml -x dokkaHtmlJar -x javadoc -x dokkaJavadocJar
# - name: Cleanup Gradle Cache
# # Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
# # Restoring these files from a GitHub Actions cache might cause problems for future builds.
# run: |
# rm -f ~/.gradle/caches/modules-2/modules-2.lock
# rm -f ~/.gradle/caches/modules-2/gc.properties
arguments: publishMavenCentralPublicationToMavenCentralRepository
36 changes: 0 additions & 36 deletions .github/workflows/publish-release.yml

This file was deleted.

12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,23 @@ Small util library featuring:

### How to retrieve it:

#### mary
```kotlin
repositories {
maven("https://raw.githubusercontent.com/kotlin-graphics/mary/master")
// or with magik plugin
//github("kotlin-graphics/mary")
}
dependencies {
implementation("kotlin.graphics:kool:0.9.75")
implementation("kotlin.graphics:kool:0.9.79")
}
```

You can find more info by [mary](https://github.com/kotlin-graphics/mary)
#### maven central
```kotlin
dependencies {
implementation("io.github.kotlin-graphics:kool:0.9.79")
}
```

You can find more info by [mary](https://github.com/kotlin-graphics/mary)
75 changes: 74 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ import magik.github
import org.jetbrains.kotlin.gradle.dsl.KotlinCompile
import org.lwjgl.Lwjgl.Module.jemalloc
import org.lwjgl.lwjgl
import java.util.*

plugins {
embeddedKotlin("jvm")
id("org.lwjgl.plugin") version "0.0.34"
id("elect86.magik") version "0.3.3"
`maven-publish`
signing
// id("com.github.johnrengelman.shadow") version "8.1.1"
}

Expand Down Expand Up @@ -46,4 +48,75 @@ publishing {
repositories { github { domain = "kotlin-graphics/mary" } }
}

java.withSourcesJar()
java {
withJavadocJar()
withSourcesJar()
}
tasks.withType<Javadoc> {
isFailOnError = false
}

configure<PublishingExtension> {
publications {
create<MavenPublication>("mavenCentral") {
groupId = "io.github.kotlin-graphics"
artifactId = "kool"
from(components["java"])
versionMapping {
usage("java-api") {
fromResolutionOf("runtimeClasspath")
}
usage("java-runtime") {
fromResolutionResult()
}
}
pom {
name.set("kool")
description.set("Buffer utils")
url.set("https://github.com/kotlin-graphics/kool")
licenses {
license {
name.set("MIT")
url.set("https://choosealicense.com/licenses/mit/")
}
}
developers {
developer {
id.set("elect86")
name.set("Giuseppe Barbieri")
email.set("[email protected]")
}
developer {
id.set("bixilon")
name.set("Moritz Zwerger")
email.set("[email protected]")
}
}
scm {
connection.set("scm:git:https://github.com/kotlin-graphics/kool.git")
developerConnection.set("scm:git:ssh://[email protected]:kotlin-graphics/kool.git")
url.set("https://github.com/kotlin-graphics/kool")
}
}
}
}
repositories {
maven {
name = "mavenCentral"
credentials {
username = project.properties["NEXUS_USERNAME"].toString()
password = project.properties["NEXUS_PASSWORD"].toString()
}

url = uri("https://s01.oss.sonatype.org/content/repositories/releases/")
}
}
}

signing {
val rawKey = project.properties["SIGNING_KEY"]?.toString() ?: return@signing
val key = String(Base64.getDecoder().decode(rawKey)) // \n is not working in environment variables
val password = project.properties["SIGNING_KEY_PASSWORD"]?.toString() ?: ""
useInMemoryPgpKeys(key, password)
sign(publishing.publications["mavenCentral"])
}
Loading

0 comments on commit 1a44fc3

Please sign in to comment.