Skip to content

Commit

Permalink
add apis
Browse files Browse the repository at this point in the history
  • Loading branch information
Nopock committed Nov 6, 2023
1 parent a801a5c commit 67aa7a2
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 51 deletions.
83 changes: 44 additions & 39 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -54,30 +54,6 @@ allprojects {
}

dependencies {
implementation(kotlin("stdlib"))
implementation(kotlin("reflect")) // Add this line

val dependencies = listOf(
"org.mongodb:mongo-java-driver:3.12.11",
"io.lettuce:lettuce-core:6.2.4.RELEASE",
"com.google.code.gson:gson:2.9.0",
"io.sentry:sentry:6.29.0",
"com.konghq:unirest-java:3.13.6:standalone",
"com.github.docker-java:docker-java:3.3.4",
"com.github.robinbraemer:CloudflareAPI:1.4.1",
"com.google.guava:guava:31.0.1-jre",
"commons-io:commons-io:2.11.0"
)

dependencies.forEach { dep ->
if (!name.contains("api") || name.contains("core")) {
implementation(dep)
} else {
compileOnly(dep)
}
}


testImplementation(kotlin("test"))

// Generate documentation
Expand All @@ -93,21 +69,6 @@ allprojects {
relocate("co.aikar.commands", "${project.group}.commands")
relocate("co.aikar.locales", "${project.group}.locales")
relocate("co.aikar.locales", "${project.group}.locales")

val packagesToExclude = listOf(
"retrofit",
"retrofit2",
"reactor",
"org",
"okio",
"okhttp3",
"io",
"google",
"eu",
"com"
)

this.exclude(packagesToExclude)
}

tasks.withType<DokkaTaskPartial>().configureEach {
Expand All @@ -121,6 +82,50 @@ allprojects {
}
}

configurations.create("final") {
dependencies {
implementation(kotlin("stdlib"))
implementation(kotlin("reflect")) // Add this line

implementation("org.mongodb:mongo-java-driver:3.12.11")
implementation("io.lettuce:lettuce-core:6.2.4.RELEASE")
implementation("com.google.code.gson:gson:2.9.0")
implementation("io.sentry:sentry:6.29.0")
implementation("com.konghq:unirest-java:3.13.6:standalone")

// Docker
implementation("com.github.docker-java:docker-java:3.3.4")

// Cloudflare
implementation("com.github.robinbraemer:CloudflareAPI:1.4.1")

implementation("com.google.guava:guava:31.0.1-jre")
implementation("commons-io:commons-io:2.11.0")
}
}

configurations.create("non-final") {
dependencies {
compileOnly(kotlin("stdlib"))
compileOnly(kotlin("reflect")) // Add this line

compileOnly("org.mongodb:mongo-java-driver:3.12.11")
compileOnly("io.lettuce:lettuce-core:6.2.4.RELEASE")
compileOnly("com.google.code.gson:gson:2.9.0")
compileOnly("io.sentry:sentry:6.29.0")
compileOnly("com.konghq:unirest-java:3.13.6:standalone")

// Docker
compileOnly("com.github.docker-java:docker-java:3.3.4")

// Cloudflare
compileOnly("com.github.robinbraemer:CloudflareAPI:1.4.1")

compileOnly("com.google.guava:guava:31.0.1-jre")
compileOnly("commons-io:commons-io:2.11.0")
}
}

publishing {
publications {
register(
Expand Down
15 changes: 9 additions & 6 deletions independent/api/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
dependencies {
api("org.reflections:reflections:0.10.2")
api("com.github.ben-manes.caffeine:caffeine:3.1.8")
api("com.squareup.retrofit2:retrofit:2.9.0")
api("com.squareup.retrofit2:converter-gson:2.9.0")
api("co.aikar:acf-core:0.5.1-SNAPSHOT")
api("de.mkammerer:argon2-jvm:2.11")

implementation("org.reflections:reflections:0.10.2")
implementation("com.github.ben-manes.caffeine:caffeine:3.1.8")
implementation("com.squareup.retrofit2:retrofit:2.9.0")
implementation("com.squareup.retrofit2:converter-gson:2.9.0")
implementation("co.aikar:acf-core:0.5.1-SNAPSHOT")
implementation("de.mkammerer:argon2-jvm:2.11")
configurations.getByName("non-final").dependencies.forEach {
this.compileOnly(it)
}
}
13 changes: 7 additions & 6 deletions velocity/api/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
dependencies {
implementation(project(":velocity"))
implementation(project(":independent:independent-api"))
api(project(":independent:independent-api"))

implementation("com.squareup.retrofit2:retrofit:2.9.0")
implementation("com.squareup.retrofit2:converter-gson:2.9.0")
compileOnly("com.velocitypowered:velocity-api:3.2.0-SNAPSHOT")
api("com.squareup.retrofit2:retrofit:2.9.0")
api("com.squareup.retrofit2:converter-gson:2.9.0")
api("com.velocitypowered:velocity-api:3.2.0-SNAPSHOT")

implementation("co.aikar:acf-core:0.5.1-SNAPSHOT")
api("co.aikar:acf-core:0.5.1-SNAPSHOT")

configurations.getByName("non-final")
}
1 change: 1 addition & 0 deletions velocity/core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ dependencies {
compileOnly("com.velocitypowered:velocity-api:3.2.0-SNAPSHOT")
annotationProcessor("com.velocitypowered:velocity-api:3.2.0-SNAPSHOT")

configurations.getByName("final")
}

0 comments on commit 67aa7a2

Please sign in to comment.