build: Implement type safe project accessors

This commit is contained in:
Adrian 2023-02-05 18:23:19 -05:00
parent 04e430466f
commit f5ecb22b06
5 changed files with 10 additions and 7 deletions

View File

@ -25,8 +25,8 @@ allprojects {
dependencies { dependencies {
shadow(project(":authmevelocity-common", "shadow")) shadow(project(":authmevelocity-common", "shadow"))
shadow(project(":authmevelocity-api-paper")) shadow(projects.authmevelocityApiPaper)
shadow(project(":authmevelocity-api-velocity")) shadow(projects.authmevelocityApiVelocity)
shadow(project(":authmevelocity-velocity", "shadow")) shadow(project(":authmevelocity-velocity", "shadow"))
shadow(project(":authmevelocity-paper", "shadow")) shadow(project(":authmevelocity-paper", "shadow"))
} }

View File

@ -1,6 +1,6 @@
plugins { plugins {
alias(libs.plugins.blossom) alias(libs.plugins.blossom)
// Required to shadow packages // Required to relocate packages
alias(libs.plugins.shadow) alias(libs.plugins.shadow)
} }

View File

@ -10,8 +10,8 @@ repositories {
} }
dependencies { dependencies {
compileOnly(project(":authmevelocity-common")) compileOnly(projects.authmevelocityCommon)
compileOnly(project(":authmevelocity-api-paper")) compileOnly(projects.authmevelocityApiPaper)
compileOnly(libs.paper) compileOnly(libs.paper)
compileOnly(libs.authme) compileOnly(libs.authme)
compileOnly(libs.miniplaceholders) compileOnly(libs.miniplaceholders)

View File

@ -1,3 +1,6 @@
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
enableFeaturePreview("VERSION_CATALOGS")
rootProject.name = "authmevelocity-parent" rootProject.name = "authmevelocity-parent"
listOf("common", "paper", "velocity").forEach { listOf("common", "paper", "velocity").forEach {

View File

@ -9,8 +9,8 @@ repositories {
} }
dependencies { dependencies {
compileOnly(project(":authmevelocity-common")) compileOnly(projects.authmevelocityCommon)
compileOnly(project(":authmevelocity-api-velocity")) compileOnly(projects.authmevelocityApiVelocity)
compileOnly(libs.velocity) compileOnly(libs.velocity)
compileOnly(libs.miniplaceholders) compileOnly(libs.miniplaceholders)
compileOnly(libs.fastlogin.velocity) compileOnly(libs.fastlogin.velocity)