build: 更改项目结构

This commit is contained in:
2023-06-16 19:29:00 +08:00
parent 57357c6ae2
commit 20517e7207
61 changed files with 19 additions and 38 deletions

48
core-common/build.gradle Normal file
View File

@@ -0,0 +1,48 @@
//file:noinspection GroovyAssignabilityCheck
setArchivesBaseName("HamsterCore-Common")
dependencies {
// https://mvnrepository.com/artifact/com.google.code.gson/gson
//noinspection GradlePackageUpdate
//noinspection VulnerableLibrariesLocal
compileOnly 'com.google.code.gson:gson:2.8.0'
// https://mvnrepository.com/artifact/net.kyori/adventure-api
compileOnly "net.kyori:adventure-api:${adventure_version}"
// https://mvnrepository.com/artifact/net.kyori/adventure-platform-api
compileOnly "net.kyori:adventure-platform-api:${adventure_version}"
// https://mvnrepository.com/artifact/net.kyori/adventure-text-minimessage
compileOnly "net.kyori:adventure-text-minimessage:${adventure_serializer_version}"
// https://mvnrepository.com/artifact/net.kyori/adventure-text-serializer-gson
compileOnly "net.kyori:adventure-text-serializer-gson:${adventure_serializer_version}"
// https://mvnrepository.com/artifact/net.kyori/adventure-text-serializer-legacy
compileOnly "net.kyori:adventure-text-serializer-legacy:${adventure_serializer_version}"
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.0'
}
test {
useJUnitPlatform()
}
publishing {
publications {
mavenJava(MavenPublication) {
from project.components.java
}
}
repositories {
maven {
def releasesRepoUrl = 'https://maven.airgame.net/maven-releases/'
def snapshotsRepoUrl = 'https://maven.airgame.net/maven-snapshots/'
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username = rootProject.properties.getOrDefault("maven_username", "")
password = rootProject.properties.getOrDefault("maven_password", "")
}
}
}
}