mirror of
https://github.com/plexusorg/Plex.git
synced 2024-12-23 01:27:37 +00:00
Fix publishing
This commit is contained in:
parent
ead38212d5
commit
5fd22ba582
@ -1,23 +1,19 @@
|
|||||||
plugins {
|
|
||||||
id 'java'
|
|
||||||
}
|
|
||||||
|
|
||||||
group = rootProject.group
|
group = rootProject.group
|
||||||
version = rootProject.version
|
version = rootProject.version
|
||||||
description = "Plex-API"
|
description = "Plex-API"
|
||||||
|
|
||||||
repositories {
|
|
||||||
mavenCentral()
|
|
||||||
mavenLocal()
|
|
||||||
maven {
|
|
||||||
url = uri("https://papermc.io/repo/repository/maven-public/")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
archiveBaseName.set("Plex-API")
|
archiveBaseName.set("Plex-API")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
maven(MavenPublication) {
|
||||||
|
from components.java
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly "org.projectlombok:lombok:1.18.22"
|
compileOnly "org.projectlombok:lombok:1.18.22"
|
||||||
annotationProcessor "org.projectlombok:lombok:1.18.22"
|
annotationProcessor "org.projectlombok:lombok:1.18.22"
|
||||||
|
55
build.gradle
55
build.gradle
@ -1,13 +1,39 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id "java"
|
id "java"
|
||||||
id "maven-publish"
|
id "maven-publish"
|
||||||
id "com.github.johnrengelman.shadow" version "7.1.2"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "dev.plex"
|
group = "dev.plex"
|
||||||
version = "1.1-SNAPSHOT"
|
version = "1.1-SNAPSHOT"
|
||||||
description = "Plex"
|
description = "Plex"
|
||||||
|
|
||||||
|
subprojects {
|
||||||
|
apply plugin: "java"
|
||||||
|
apply plugin: "maven-publish"
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
url = uri("https://papermc.io/repo/repository/maven-public/")
|
||||||
|
}
|
||||||
|
|
||||||
|
maven {
|
||||||
|
url = uri("https://repository.apache.org/content/repositories/snapshots/")
|
||||||
|
}
|
||||||
|
|
||||||
|
maven {
|
||||||
|
url = uri("https://repo.maven.apache.org/maven2/")
|
||||||
|
}
|
||||||
|
|
||||||
|
maven {
|
||||||
|
url = uri("https://jitpack.io")
|
||||||
|
content {
|
||||||
|
includeGroup("com.github.MilkBowl")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
|
||||||
java {
|
java {
|
||||||
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
|
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
|
||||||
}
|
}
|
||||||
@ -17,35 +43,11 @@ tasks.withType(JavaCompile) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
publishing {
|
publishing {
|
||||||
publications {
|
|
||||||
maven(MavenPublication) {
|
|
||||||
pom.withXml {
|
|
||||||
def dependenciesNode = asNode().appendNode("dependencies")
|
|
||||||
configurations.getByName("library").getAllDependencies().each { dependency ->
|
|
||||||
dependenciesNode.appendNode("dependency").with {
|
|
||||||
it.appendNode("groupId", dependency.group)
|
|
||||||
it.appendNode("artifactId", dependency.name)
|
|
||||||
it.appendNode("version", dependency.version)
|
|
||||||
it.appendNode("scope", "provided")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
configurations.getByName("implementation").getAllDependencies().each { dependency ->
|
|
||||||
dependenciesNode.appendNode("dependency").with {
|
|
||||||
it.appendNode("groupId", dependency.group)
|
|
||||||
it.appendNode("artifactId", dependency.name)
|
|
||||||
it.appendNode("version", dependency.version)
|
|
||||||
it.appendNode("scope", "runtime")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
artifacts = [shadowJar]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven {
|
||||||
def releasesRepoUrl = uri("https://nexus.telesphoreo.me/repository/plex-releases/")
|
def releasesRepoUrl = uri("https://nexus.telesphoreo.me/repository/plex-releases/")
|
||||||
def snapshotsRepoUrl = uri("https://nexus.telesphoreo.me/repository/plex-snapshots/")
|
def snapshotsRepoUrl = uri("https://nexus.telesphoreo.me/repository/plex-snapshots/")
|
||||||
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
|
url = rootProject.version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
|
||||||
credentials {
|
credentials {
|
||||||
username = System.getenv("plexUser")
|
username = System.getenv("plexUser")
|
||||||
password = System.getenv("plexPassword")
|
password = System.getenv("plexPassword")
|
||||||
@ -53,3 +55,4 @@ publishing {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
@ -1,34 +1,8 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id "java"
|
|
||||||
id "maven-publish"
|
|
||||||
id "net.minecrell.plugin-yml.bukkit" version "0.6.1-SNAPSHOT"
|
id "net.minecrell.plugin-yml.bukkit" version "0.6.1-SNAPSHOT"
|
||||||
id "com.github.johnrengelman.shadow" version "7.1.2"
|
id "com.github.johnrengelman.shadow" version "7.1.2"
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
|
||||||
mavenLocal()
|
|
||||||
maven {
|
|
||||||
url = uri("https://papermc.io/repo/repository/maven-public/")
|
|
||||||
}
|
|
||||||
|
|
||||||
maven {
|
|
||||||
url = uri("https://repository.apache.org/content/repositories/snapshots/")
|
|
||||||
}
|
|
||||||
|
|
||||||
maven {
|
|
||||||
url = uri("https://repo.maven.apache.org/maven2/")
|
|
||||||
}
|
|
||||||
|
|
||||||
maven {
|
|
||||||
url = uri("https://jitpack.io")
|
|
||||||
content {
|
|
||||||
includeGroup("com.github.MilkBowl")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
library "org.projectlombok:lombok:1.18.22"
|
library "org.projectlombok:lombok:1.18.22"
|
||||||
annotationProcessor "org.projectlombok:lombok:1.18.22"
|
annotationProcessor "org.projectlombok:lombok:1.18.22"
|
||||||
@ -134,3 +108,29 @@ tasks {
|
|||||||
options.memberLevel = JavadocMemberLevel.PRIVATE
|
options.memberLevel = JavadocMemberLevel.PRIVATE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
maven(MavenPublication) {
|
||||||
|
pom.withXml {
|
||||||
|
def dependenciesNode = asNode().appendNode("dependencies")
|
||||||
|
configurations.getByName("library").getAllDependencies().each { dependency ->
|
||||||
|
dependenciesNode.appendNode("dependency").with {
|
||||||
|
it.appendNode("groupId", dependency.group)
|
||||||
|
it.appendNode("artifactId", dependency.name)
|
||||||
|
it.appendNode("version", dependency.version)
|
||||||
|
it.appendNode("scope", "provided")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
configurations.getByName("implementation").getAllDependencies().each { dependency ->
|
||||||
|
dependenciesNode.appendNode("dependency").with {
|
||||||
|
it.appendNode("groupId", dependency.group)
|
||||||
|
it.appendNode("artifactId", dependency.name)
|
||||||
|
it.appendNode("version", dependency.version)
|
||||||
|
it.appendNode("scope", "runtime")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user