Remove forge/liteloader specific repos.
Just put everything in the libraries repo.
This commit is contained in:
@@ -4,7 +4,6 @@ import { basename, dirname, join } from 'path'
|
||||
import { VersionManifest113 } from '../../../model/forge/versionmanifest113'
|
||||
import { Module } from '../../../model/spec/module'
|
||||
import { Type } from '../../../model/spec/type'
|
||||
import { ForgeRepoStructure } from '../../../model/struct/repo/forgerepo.struct'
|
||||
import { LibRepoStructure } from '../../../model/struct/repo/librepo.struct'
|
||||
import { JavaUtil } from '../../../util/javautil'
|
||||
import { MavenUtil } from '../../../util/maven'
|
||||
@@ -36,15 +35,15 @@ export class Forge113Adapter extends ForgeResolver {
|
||||
}
|
||||
|
||||
private async process() {
|
||||
const forgeRepo = this.repoStructure.getForgeRepoStruct()
|
||||
const installerPath = forgeRepo.getLocalForge(this.artifactVersion, 'installer')
|
||||
const libRepo = this.repoStructure.getLibRepoStruct()
|
||||
const installerPath = libRepo.getLocalForge(this.artifactVersion, 'installer')
|
||||
console.debug(`Checking for forge installer at ${installerPath}..`)
|
||||
if (!await forgeRepo.artifactExists(installerPath)) {
|
||||
if (!await libRepo.artifactExists(installerPath)) {
|
||||
console.debug(`Forge installer not found locally, initializing download..`)
|
||||
await forgeRepo.downloadArtifactByComponents(
|
||||
await libRepo.downloadArtifactByComponents(
|
||||
this.REMOTE_REPOSITORY,
|
||||
ForgeRepoStructure.FORGE_GROUP,
|
||||
ForgeRepoStructure.FORGE_ARTIFACT,
|
||||
LibRepoStructure.FORGE_GROUP,
|
||||
LibRepoStructure.FORGE_ARTIFACT,
|
||||
this.artifactVersion, 'installer', 'jar'
|
||||
)
|
||||
} else {
|
||||
@@ -158,22 +157,22 @@ export class Forge113Adapter extends ForgeResolver {
|
||||
const generatedFiles = [
|
||||
{
|
||||
name: 'base jar',
|
||||
group: ForgeRepoStructure.FORGE_GROUP,
|
||||
artifact: ForgeRepoStructure.FORGE_ARTIFACT,
|
||||
group: LibRepoStructure.FORGE_GROUP,
|
||||
artifact: LibRepoStructure.FORGE_ARTIFACT,
|
||||
version: this.artifactVersion,
|
||||
classifier: undefined
|
||||
},
|
||||
{
|
||||
name: 'universal jar',
|
||||
group: ForgeRepoStructure.FORGE_GROUP,
|
||||
artifact: ForgeRepoStructure.FORGE_ARTIFACT,
|
||||
group: LibRepoStructure.FORGE_GROUP,
|
||||
artifact: LibRepoStructure.FORGE_ARTIFACT,
|
||||
version: this.artifactVersion,
|
||||
classifier: 'universal'
|
||||
},
|
||||
{
|
||||
name: 'client jar',
|
||||
group: ForgeRepoStructure.FORGE_GROUP,
|
||||
artifact: ForgeRepoStructure.FORGE_ARTIFACT,
|
||||
group: LibRepoStructure.FORGE_GROUP,
|
||||
artifact: LibRepoStructure.FORGE_ARTIFACT,
|
||||
version: this.artifactVersion,
|
||||
classifier: 'client'
|
||||
},
|
||||
|
||||
@@ -5,7 +5,7 @@ import { basename, join } from 'path'
|
||||
import { VersionManifest17 } from '../../../model/forge/versionmanifest17'
|
||||
import { Module } from '../../../model/spec/module'
|
||||
import { Type } from '../../../model/spec/type'
|
||||
import { ForgeRepoStructure } from '../../../model/struct/repo/forgerepo.struct'
|
||||
import { LibRepoStructure } from '../../../model/struct/repo/librepo.struct'
|
||||
import { MavenUtil } from '../../../util/maven'
|
||||
import { PackXZExtractWrapper } from '../../../util/PackXZExtractWrapper'
|
||||
import { VersionUtil } from '../../../util/versionutil'
|
||||
@@ -36,15 +36,15 @@ export class Forge17Adapter extends ForgeResolver {
|
||||
}
|
||||
|
||||
public async getForgeByVersion() {
|
||||
const forgeRepo = this.repoStructure.getForgeRepoStruct()
|
||||
const targetLocalPath = forgeRepo.getLocalForge(this.artifactVersion, 'universal')
|
||||
const libRepo = this.repoStructure.getLibRepoStruct()
|
||||
const targetLocalPath = libRepo.getLocalForge(this.artifactVersion, 'universal')
|
||||
console.debug(`Checking for forge version at ${targetLocalPath}..`)
|
||||
if (!await forgeRepo.artifactExists(targetLocalPath)) {
|
||||
if (!await libRepo.artifactExists(targetLocalPath)) {
|
||||
console.debug(`Forge not found locally, initializing download..`)
|
||||
await forgeRepo.downloadArtifactByComponents(
|
||||
await libRepo.downloadArtifactByComponents(
|
||||
this.REMOTE_REPOSITORY,
|
||||
ForgeRepoStructure.FORGE_GROUP,
|
||||
ForgeRepoStructure.FORGE_ARTIFACT,
|
||||
LibRepoStructure.FORGE_GROUP,
|
||||
LibRepoStructure.FORGE_ARTIFACT,
|
||||
this.artifactVersion, 'universal', 'jar')
|
||||
} else {
|
||||
console.debug('Using locally discovered forge.')
|
||||
@@ -72,8 +72,8 @@ export class Forge17Adapter extends ForgeResolver {
|
||||
|
||||
const forgeModule: Module = {
|
||||
id: MavenUtil.mavenComponentsToIdentifier(
|
||||
ForgeRepoStructure.FORGE_GROUP,
|
||||
ForgeRepoStructure.FORGE_ARTIFACT,
|
||||
LibRepoStructure.FORGE_GROUP,
|
||||
LibRepoStructure.FORGE_ARTIFACT,
|
||||
this.artifactVersion, 'universal'
|
||||
),
|
||||
name: 'Minecraft Forge',
|
||||
@@ -81,10 +81,10 @@ export class Forge17Adapter extends ForgeResolver {
|
||||
artifact: this.generateArtifact(
|
||||
forgeUniversalBuffer,
|
||||
await lstat(targetLocalPath),
|
||||
forgeRepo.getArtifactUrlByComponents(
|
||||
libRepo.getArtifactUrlByComponents(
|
||||
this.baseUrl,
|
||||
ForgeRepoStructure.FORGE_GROUP,
|
||||
ForgeRepoStructure.FORGE_ARTIFACT,
|
||||
LibRepoStructure.FORGE_GROUP,
|
||||
LibRepoStructure.FORGE_ARTIFACT,
|
||||
this.artifactVersion, 'universal'
|
||||
)
|
||||
),
|
||||
@@ -100,7 +100,6 @@ export class Forge17Adapter extends ForgeResolver {
|
||||
}
|
||||
console.debug(`Processing ${lib.name}..`)
|
||||
|
||||
const libRepo = this.repoStructure.getLibRepoStruct()
|
||||
const extension = this.determineExtension(lib.checksums)
|
||||
const localPath = libRepo.getArtifactById(lib.name, extension) as string
|
||||
|
||||
|
||||
Reference in New Issue
Block a user