Skip to content

Commit

Permalink
First release
Browse files Browse the repository at this point in the history
  • Loading branch information
DRSchlaubi committed Mar 22, 2021
1 parent 6155391 commit 8907933
Show file tree
Hide file tree
Showing 91 changed files with 767 additions and 423 deletions.
30 changes: 29 additions & 1 deletion .github/workflows/github-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,32 @@ jobs:

- name: Gradle (Testing)
# TODO: Add jsIrTest when #4 gets fixed
run: gradle --stacktrace --info core:jvmTest
run: gradle --stacktrace --info core:jvmTest
release:
name: Publish artifacts
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/main'
env:
BINTRAY_KEY: ${{ secrets.BINTRAY_KEY }}
BINTRAY_USER: ${{ secrets.BINTRAY_USER }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.signingKey }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.signingPassword }}
ACTIONS_ALLOW_UNSECURE_COMMANDS: true

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Set up JDK 15
uses: actions/setup-java@v1
with:
java-version: 15
- name: Publish with Gradle
run: gradle publishAllPublicationsToMavenRepository
1 change: 1 addition & 0 deletions .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/artifacts/core_js_1_0_0_SNAPSHOT.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/artifacts/core_jvm_1_0_0_SNAPSHOT.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/artifacts/java_jvm_1_0_0_SNAPSHOT.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/artifacts/jda_java_jvm_1_0_0_SNAPSHOT.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/artifacts/jda_jvm_1_0_0_SNAPSHOT.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/artifacts/jsExample_1_0_SNAPSHOT.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/artifacts/kord_jvm_1_0_0_SNAPSHOT.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion .idea/aws.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 1 addition & 18 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions .idea/csv-plugin.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
l.mik.wtf
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ Lavalink download: [https://github.com/Frederikam/Lavalink](https://github.com/F
# Download

You can get Lavakord from
here: [https://package-search.jetbrains.com/package?id=me.schlaubi%3Alavakord](https://package-search.jetbrains.com/package?id=me.schlaubi%3Alavakord) (
You need `jcenter()` and jitpack though)
here: https://schlaubi.jfrog.io/ui/repos/tree/General/lavakord%2Fdev%2Fschlaubi%2Flavakord

# Usage

Expand Down
42 changes: 42 additions & 0 deletions bom/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
plugins {
`java-platform`
`maven-publish`
}

applyPublishing()

val me = project

// Without Gradle won't find any project with the publish plugin applied
javaPlatform.allowDependencies()
rootProject.subprojects {
if (name != me.name) {
me.evaluationDependsOn(path)
}
}

dependencies {
constraints {
rootProject.subprojects.forEach {
if (it.plugins.hasPlugin("maven-publish") && it.name != name) {
it.publishing.publications.all {
if (this is MavenPublication) {
if (!artifactId.endsWith("-metadata") &&
!artifactId.endsWith("-kotlinMultiplatform")
) {
api(groupId, artifactId, version)
}
}
}
}
}
}
}

publishing {
publications {
create<MavenPublication>("maven") {
from(components.getByName("javaPlatform"))
}
}
}
5 changes: 2 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ plugins {
`maven-publish`
kotlin("multiplatform") version Versions.kotlin apply false
kotlin("plugin.serialization") version Versions.kotlin apply false
id("com.jfrog.bintray") version Versions.bintray apply false
id("org.jetbrains.dokka") version "1.4.20"
id("kotlinx-atomicfu") version Versions.atomicFu apply false
id("org.ajoberstar.git-publish") version "2.1.3"
Expand All @@ -28,8 +27,8 @@ tasks {
val docs = task<Copy>("createDocsIndex") {
dependsOn(dokkaHtmlMultiModule)
val outputDirectory = dokkaHtmlMultiModule.get().outputDirectory.get()
from(outputDirectory)
include("-modules.html")
from(outputDirectory, rootProject.projectDir)
include("CNAME", "-modules.html")
into(outputDirectory)

rename("-modules.html", "index.html")
Expand Down
17 changes: 8 additions & 9 deletions buildSrc/src/main/kotlin/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@ import org.gradle.api.artifacts.dsl.RepositoryHandler
import org.gradle.kotlin.dsl.maven

object Versions {
const val kotlin = "1.4.30"
const val ktor = "1.4.1"
const val coroutines = "1.4.2"
const val kotlinxSerialization = "1.0.1"
const val kotlinLogging = "2.0.4"
const val kotlin = "1.4.31"
const val ktor = "1.5.2"
const val coroutines = "1.4.3"
const val kotlinxSerialization = "1.1.0"
const val kotlinLogging = "2.0.5"
const val kord = "0.7.0-SNAPSHOT"
const val bintray = "1.8.5"
const val atomicFu = "0.14.4"
const val atomicFu = "0.15.2"

const val junit5 = "5.6.0"
const val junit5 = "5.6.2"
const val junitJupiterEngine = junit5
const val coroutinesTest = coroutines
const val slf4j = "1.7.30"
Expand Down Expand Up @@ -44,4 +43,4 @@ object Dependencies {

fun RepositoryHandler.jitpack() = maven("https://jitpack.io")
fun RepositoryHandler.kord() = maven("https://dl.bintray.com/kordlib/Kord")
fun RepositoryHandler.sonatype() = maven("https://oss.sonatype.org/content/repositories/snapshots/")
fun RepositoryHandler.sonatype() = maven("https://oss.sonatype.org/content/repositories/snapshots/")
52 changes: 4 additions & 48 deletions buildSrc/src/main/kotlin/Publishing.kt
Original file line number Diff line number Diff line change
@@ -1,53 +1,9 @@
import org.gradle.api.Project
import org.gradle.api.publish.PublishingExtension
import org.gradle.api.publish.maven.MavenPublication
import org.gradle.kotlin.dsl.apply

fun Project.applyPublishing() {
apply(plugin = "publishing")
val configure: PublishingExtension.() -> Unit = {
repositories {
maven {
setUrl("https://schlaubi.jfrog.io/artifactory/lavakord")
fun Project.applyPublishing(): Unit = apply(from = "../publishing.gradle.kts")

credentials {
username = System.getenv("BINTRAY_USER")
password = System.getenv("BINTRAY_KEY")
}
}
}

publications {
filterIsInstance<MavenPublication>().forEach { publication ->
publication.pom {
name.set(project.name)
description.set("Extension of the official LavaLink-Client to work with Kord")
url.set("https://github.com/DRSchlaubi/lavakord")

licenses {
license {
name.set("MIT License")
url.set("https://github.com/DRSchlaubi/Lavakord/blob/master/LICENSE")
}
}

developers {
developer {
name.set("Michael Rittmeister")
email.set("[email protected]")
organizationUrl.set("https://michael.rittmeister.in")
}
}

scm {
connection.set("scm:git:https://github.com/DRSchlaubi/lavakord.git")
developerConnection.set("scm:git:https://github.com/DRSchlaubi/lavakord.git")
url.set("https://github.com/DRSchlaubi/lavakord")
}
}
}
}
}

(this as org.gradle.api.plugins.ExtensionAware).extensions.configure("publishing", configure)
}
val Project.publishing: PublishingExtension
get() =
(this as org.gradle.api.plugins.ExtensionAware).extensions.getByName("publishing") as PublishingExtension
36 changes: 18 additions & 18 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ kotlin {
}

// See https://github.com/DRSchlaubi/Lavakord/issues/2
// js(IR) {
// nodejs()
// // browser() doesn't work because the js websocket client does not allowed you to set headers
// // Apart from that why would you need Lavalink in your browser?
// }
js(IR) {
nodejs()
// browser() doesn't work because the js websocket client does not allowed you to set headers
// Apart from that why would you need Lavalink in your browser?
}

sourceSets {
all {

languageSettings.useExperimentalAnnotation(ExpermientalAnnotations.requiresOptIn)
languageSettings.useExperimentalAnnotation(ExpermientalAnnotations.experimentalTime)
repositories {
jcenter()
Expand Down Expand Up @@ -87,18 +87,18 @@ kotlin {
}
}

// jsMain {
// dependencies {
// implementation(Dependencies.`ktor-client-js`)
//
// }
// }
//
// jsTest {
// dependencies {
// implementation(kotlin("test-js"))
// }
// }
jsMain {
dependencies {
implementation(Dependencies.`ktor-client-js`)

}
}

jsTest {
dependencies {
implementation(kotlin("test-js"))
}
}
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package dev.kord.x.lavalink
package dev.schlaubi.lavakord

import dev.kord.x.lavalink.audio.Link
import dev.kord.x.lavalink.rest.addressStatus
import dev.schlaubi.lavakord.audio.Link


/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package dev.kord.x.lavalink
package dev.schlaubi.lavakord

import dev.schlaubi.lavakord.audio.Link
import dev.schlaubi.lavakord.audio.Node
import io.ktor.http.*
import kotlinx.coroutines.CoroutineScope
import dev.kord.x.lavalink.audio.Link
import dev.kord.x.lavalink.audio.Node

/**
* Representation of a Lavalink cluster.
Expand Down
Loading

0 comments on commit 8907933

Please sign in to comment.