-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
l.mik.wtf |
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")) | ||
} | ||
} | ||
} |
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 |