project: create poms when building, and utilize them in bootstrap. (#2259)

* project: create poms when building, and utilize them in bootstrap.

* gradle: only publish during bootstrapping

Co-authored-by: Owain van Brakel <owain.vanbrakel@gmail.com>
This commit is contained in:
Ganom
2020-01-16 20:40:02 -05:00
committed by GitHub
parent d924d5e0a9
commit 354b426b02
4 changed files with 18 additions and 10 deletions

View File

@@ -92,22 +92,16 @@ subprojects {
configure<PublishingExtension> { configure<PublishingExtension> {
repositories { repositories {
maven { maven {
name = "runelite" url = uri("$buildDir/repo")
url = uri("https://maven.pkg.github.com/open-osrs/runelite")
credentials {
username = System.getProperty("gpr_user")
password = System.getProperty("gpr_key")
}
} }
} }
publications { publications {
register("gpr", MavenPublication::class) { register("mavenJava", MavenPublication::class) {
from(components["java"]) from(components["java"])
} }
} }
} }
tasks { tasks {
java { java {
sourceCompatibility = JavaVersion.VERSION_11 sourceCompatibility = JavaVersion.VERSION_11

View File

@@ -31,6 +31,11 @@ class BootstrapPlugin : Plugin<Project> {
tasks.withType<BootstrapTask> { tasks.withType<BootstrapTask> {
dependsOn(bootstrapDependencies) dependsOn(bootstrapDependencies)
dependsOn(project(":runelite-api").tasks["publish"])
dependsOn(project(":runescape-api").tasks["publish"])
dependsOn(project(":http-api").tasks["publish"])
dependsOn(project(":injected-client").tasks["publish"])
this.clientJar = clientJar.singleFile this.clientJar = clientJar.singleFile
doLast { doLast {
@@ -38,6 +43,15 @@ class BootstrapPlugin : Plugin<Project> {
from(bootstrapDependencies) from(bootstrapDependencies)
into("${buildDir}/bootstrap/${type}/") into("${buildDir}/bootstrap/${type}/")
} }
copy {
from(
"${parent?.projectDir}/runelite-client/build/repo/.",
"${parent?.projectDir}/runelite-api/build/repo/.",
"${parent?.projectDir}/http-api/build/repo/.",
"${parent?.projectDir}/runescape-api/build/repo/."
)
into("${buildDir}/bootstrap/repo/")
}
} }
} }
} }

View File

@@ -36,4 +36,4 @@ dependencies {
implementation(Libraries.slf4jApi) implementation(Libraries.slf4jApi)
testImplementation(Libraries.junit) testImplementation(Libraries.junit)
} }

View File

@@ -24,8 +24,8 @@
*/ */
import org.apache.tools.ant.filters.ReplaceTokens import org.apache.tools.ant.filters.ReplaceTokens
import java.util.Date
import java.text.SimpleDateFormat import java.text.SimpleDateFormat
import java.util.*
plugins { plugins {
id(Plugins.shadow.first) version Plugins.shadow.second id(Plugins.shadow.first) version Plugins.shadow.second