-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master'
# Conflicts: # gradle/wrapper/gradle-wrapper.properties # settings.gradle.kts
- Loading branch information
Showing
9 changed files
with
409 additions
and
290 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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" | ||
} | ||
|
||
|
@@ -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"]) | ||
} |
Oops, something went wrong.