project: Rework external plugins, local instances syncing, hotswapping
This commit is contained in:
@@ -34,6 +34,7 @@ open class BootstrapTask @Inject constructor(@Input val type: String) : DefaultT
|
||||
|
||||
private fun getArtifacts(): Array<JsonBuilder> {
|
||||
val artifacts = ArrayList<JsonBuilder>()
|
||||
val artifactsSet = HashSet<String>()
|
||||
|
||||
project.configurations["runtimeClasspath"].resolvedConfiguration.resolvedArtifacts.forEach {
|
||||
val module = it.moduleVersion.id.toString()
|
||||
@@ -44,7 +45,11 @@ open class BootstrapTask @Inject constructor(@Input val type: String) : DefaultT
|
||||
val version = splat[2]
|
||||
lateinit var path: String
|
||||
|
||||
if (it.file.name.contains(ProjectVersions.openosrsVersion)) {
|
||||
if (it.file.name.contains("injected-client") ||
|
||||
it.file.name.contains("runelite-client") ||
|
||||
it.file.name.contains("http-api") ||
|
||||
it.file.name.contains("runescape-api") ||
|
||||
it.file.name.contains("runelite-api")) {
|
||||
path = "https://github.com/open-osrs/hosting/raw/master/${type}/${it.file.name}"
|
||||
} else if (it.file.name.contains("injection-annotations") || it.file.name.contains("rxrelay")) {
|
||||
path = "https://github.com/open-osrs/hosting/raw/master/" + group.replace(".", "/") + "/${name}/$version/${it.file.name}"
|
||||
@@ -62,14 +67,18 @@ open class BootstrapTask @Inject constructor(@Input val type: String) : DefaultT
|
||||
path += "${name}/$version/${name}-$version.jar"
|
||||
}
|
||||
|
||||
val artifactFile = File(it.file.absolutePath)
|
||||
val filePath = it.file.absolutePath
|
||||
val artifactFile = File(filePath)
|
||||
|
||||
artifacts.add(JsonBuilder(
|
||||
"name" to it.file.name,
|
||||
"path" to path,
|
||||
"size" to artifactFile.length(),
|
||||
"hash" to hash(artifactFile.readBytes())
|
||||
))
|
||||
if (!artifactsSet.contains(filePath)) {
|
||||
artifactsSet.add(filePath)
|
||||
artifacts.add(JsonBuilder(
|
||||
"name" to it.file.name,
|
||||
"path" to path,
|
||||
"size" to artifactFile.length(),
|
||||
"hash" to hash(artifactFile.readBytes())
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
artifacts.add(JsonBuilder(
|
||||
|
||||
@@ -62,6 +62,7 @@ object Libraries {
|
||||
const val guice = "4.2.2"
|
||||
const val h2 = "1.4.200"
|
||||
const val hamcrest = "2.2"
|
||||
const val javagroups = "4.0.0.Final"
|
||||
const val javax = "1.3.2"
|
||||
const val javaxInject = "1"
|
||||
const val jna = "5.5.0"
|
||||
@@ -108,6 +109,7 @@ object Libraries {
|
||||
const val guiceTestlib = "com.google.inject.extensions:guice-testlib:${Versions.guice}"
|
||||
const val h2 = "com.h2database:h2:${Versions.h2}"
|
||||
const val hamcrest = "org.hamcrest:hamcrest-library:${Versions.hamcrest}"
|
||||
const val javagroups = "org.jgroups:jgroups:${Versions.javagroups}"
|
||||
const val javax = "javax.annotation:javax.annotation-api:${Versions.javax}"
|
||||
const val javaxInject = "javax.inject:javax.inject:${Versions.javaxInject}"
|
||||
const val jna = "net.java.dev.jna:jna:${Versions.jna}"
|
||||
|
||||
Reference in New Issue
Block a user