Skip to content

Commit

Permalink
Merge pull request #7 from VEuPathDB/split-compat
Browse files Browse the repository at this point in the history
Forked Compatibility
  • Loading branch information
Foxcapades authored Aug 19, 2024
2 parents 2d94fef + dc3f0e5 commit c888eef
Show file tree
Hide file tree
Showing 382 changed files with 65,703 additions and 10,948 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,11 @@
/test/.gradle/
/out/
/test/out/

/lib/build/

/lib/java/docs/
/lib/java/build/

/lib/kotlin/build/
/lib/kotlin/docs/
183 changes: 98 additions & 85 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,111 +1,124 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.jetbrains.kotlin.gradle.internal.ensureParentDirsCreated

plugins {
kotlin("jvm") version "1.8.0"
id("org.jetbrains.dokka") version "1.7.20"
kotlin("jvm") version "2.0.10"
id("org.jetbrains.dokka") version "1.9.20"
java
`maven-publish`
}

group = "org.veupathdb.lib.s3"
version = "4.1.2"

repositories {
mavenLocal()
mavenCentral()

maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/veupathdb/packages")
credentials {
username = project.findProperty("gpr.user") as String? ?: System.getenv("GITHUB_USERNAME")
password = project.findProperty("gpr.key") as String? ?: System.getenv("GITHUB_TOKEN")
version = "5.0.0"

allprojects {
repositories {
mavenLocal()
mavenCentral()

maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/veupathdb/packages")
credentials {
username = project.findProperty("gpr.user") as String? ?: System.getenv("GITHUB_USERNAME")
password = project.findProperty("gpr.key") as String? ?: System.getenv("GITHUB_TOKEN")
}
}
}
}

kotlin {
jvmToolchain(16)
}

dependencies {
implementation(kotlin("stdlib"))
implementation(kotlin("stdlib-jdk8"))

implementation("org.veupathdb.lib.s3:s34k-minio:0.7.2+s34k-0.11.0")

implementation("org.veupathdb.lib:hash-id:1.0.2")

implementation("org.slf4j:slf4j-api:1.7.36")
configure(listOf(project(":lib:workspaces-kt"), project(":lib:workspaces-java"))) {
apply(plugin = "java")
apply(plugin = "maven-publish")
apply(plugin = "org.jetbrains.dokka")

implementation("org.apache.logging.log4j:log4j-api:2.17.2")
implementation("org.apache.logging.log4j:log4j-core:2.17.2")
implementation("org.apache.logging.log4j:log4j-slf4j-impl:2.17.2")

testImplementation("org.mockito:mockito-core:4.5.1")
testImplementation("org.junit.jupiter:junit-jupiter:5.8.2")
testImplementation(kotlin("test"))
}
java {
withJavadocJar()
withSourcesJar()
}

java {
withJavadocJar()
withSourcesJar()
}
tasks.dokkaHtml {
outputDirectory.set(file("docs/dokka"))
}

tasks.javadoc {
exclude("module-info.java")
}
tasks.dokkaJavadoc {
outputDirectory.set(file("docs/javadoc"))
}

tasks.dokkaHtml {
outputDirectory.set(file("docs/dokka"))
}
tasks.test {
useJUnitPlatform()
}

tasks.dokkaJavadoc {
outputDirectory.set(file("docs/javadoc"))
}
publishing {
repositories {
maven {
name = "GitHub"
url = uri("https://maven.pkg.github.com/VEuPathDB/lib-s3-workspace")
credentials {
username = project.findProperty("gpr.user") as String? ?: System.getenv("USERNAME")
password = project.findProperty("gpr.key") as String? ?: System.getenv("TOKEN")
}
}
}

task("docs") {
dependsOn("dokkaHtml", "dokkaJavadoc")
}
publications {
create<MavenPublication>("gpr") {
artifactId = project.name
groupId = rootProject.group.toString()
version = rootProject.version.toString()

tasks.test {
useJUnitPlatform()
}
from(components["java"])

publishing {
repositories {
maven {
name = "GitHub"
url = uri("https://maven.pkg.github.com/VEuPathDB/lib-s3-workspace")
credentials {
username = project.findProperty("gpr.user") as String? ?: System.getenv("USERNAME")
password = project.findProperty("gpr.key") as String? ?: System.getenv("TOKEN")
pom {
name.set("S3 Workspaces")
description.set("Workspaces backed by an S3 object store.")
url.set("https://github.com/VEuPathDB/lib-s3-workspace")
developers {
developer {
id.set("epharper")
name.set("Elizabeth Paige Harper")
email.set("[email protected]")
url.set("https://github.com/foxcapades")
organization.set("VEuPathDB")
}
}
scm {
connection.set("scm:git:git://github.com/VEuPathDB/lib-s3-workspace.git")
developerConnection.set("scm:git:ssh://github.com/VEuPathDB/lib-s3-workspace.git")
url.set("https://github.com/VEuPathDB/lib-s3-workspace")
}
}
}
}
}
}

publications {
create<MavenPublication>("gpr") {
from(components["java"])
pom {
name.set("S3 Workspaces")
description.set("Workspaces backed by an S3 object store.")
url.set("https://github.com/VEuPathDB/lib-s3-workspace")
developers {
developer {
id.set("epharper")
name.set("Elizabeth Paige Harper")
email.set("[email protected]")
url.set("https://github.com/foxcapades")
organization.set("VEuPathDB")
}
}
scm {
connection.set("scm:git:git://github.com/VEuPathDB/lib-s3-workspace.git")
developerConnection.set("scm:git:ssh://github.com/VEuPathDB/lib-s3-workspace.git")
url.set("https://github.com/VEuPathDB/lib-s3-workspace")
}
}

task("docs") {
dependsOn(
":lib:workspaces-java:dokkaHtml",
":lib:workspaces-java:dokkaJavadoc",
":lib:workspaces-kt:dokkaHtml",
":lib:workspaces-kt:dokkaJavadoc",
)

doLast {
val docDirs = mapOf(
file("lib/java/docs/dokka") to file("docs/java/dokka"),
file("lib/java/docs/javadoc") to file("docs/java/javadoc"),
file("lib/kotlin/docs/dokka") to file("docs/kotlin/dokka"),
file("lib/kotlin/docs/javadoc") to file("docs/kotlin/javadoc"),
)

for ((from, to) in docDirs) {
if (!from.exists())
throw Exception("expected path $from to exist but it didn't")

if (to.exists())
to.deleteRecursively()
else
to.ensureParentDirsCreated()

from.copyRecursively(to)
}
}
}
4 changes: 0 additions & 4 deletions docs/dokka/images/theme-toggle.svg

This file was deleted.

52 changes: 0 additions & 52 deletions docs/dokka/index.html

This file was deleted.

22 changes: 0 additions & 22 deletions docs/dokka/navigation.html

This file was deleted.

Loading

0 comments on commit c888eef

Please sign in to comment.