Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
21 changes: 21 additions & 0 deletions build-logic/src/main/kotlin/capability-artifact.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.gradle.jvm.tasks.Jar

plugins {
id("capability")
id("relocations")
}

val shadowJar = tasks.named<ShadowJar>("shadowJar") {
archiveClassifier.set("")
}

tasks.named<Jar>("jar").configure {
// Keep the normal Java/Maven artifact path, but let Shadow produce its relocated contents.
actions.clear()
dependsOn(shadowJar)
}

tasks.named("assemble").configure {
dependsOn(shadowJar)
}
5 changes: 5 additions & 0 deletions build-logic/src/main/kotlin/capability.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
plugins {
id("api")
}

group = "me.whereareiam.identica.capability"
15 changes: 15 additions & 0 deletions build-logic/src/main/kotlin/relocations.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar

plugins {
id("com.gradleup.shadow")
}

tasks.withType<ShadowJar>().configureEach {
relocate("com.google.inject", "me.whereareiam.identica.library.guice")
relocate("com.google.common", "me.whereareiam.identica.library.guava")
relocate("org.bstats", "me.whereareiam.identica.library.bstats")
relocate("org.jdbi", "me.whereareiam.identica.library.jdbi")
relocate("me.whereareiam.dialectica", "me.whereareiam.identica.library.dialectica")
relocate("com.fasterxml.jackson", "me.whereareiam.identica.library.jackson")
relocate("org.yaml.snakeyaml", "me.whereareiam.identica.library.snakeyaml")
}
10 changes: 1 addition & 9 deletions build-logic/src/main/kotlin/runtime.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,12 @@ import org.gradle.jvm.tasks.Jar

plugins {
id("shared")
id("com.gradleup.shadow")
id("relocations")
}

tasks.withType<ShadowJar>().configureEach {
archiveBaseName.set(rootProject.name)

relocate("com.google.inject", "me.whereareiam.identica.library.guice")
relocate("com.google.common", "me.whereareiam.identica.library.guava")
relocate("org.bstats", "me.whereareiam.identica.library.bstats")
relocate("org.jdbi", "me.whereareiam.identica.library.jdbi")
relocate("me.whereareiam.dialectica", "me.whereareiam.identica.library.dialectica")
relocate("com.fasterxml.jackson", "me.whereareiam.identica.library.jackson")
relocate("org.yaml.snakeyaml", "me.whereareiam.identica.library.snakeyaml")

val defaultDestination = rootProject.layout.buildDirectory.dir("libs")

if (providers.gradleProperty("output").isPresent) {
Expand Down
57 changes: 57 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ allprojects {

extensions.configure<AttacheExtension>("attache") {
transitive.set(true)

mavenLocal()
repository("https://maven.whereareiam.me/release")
repository("https://maven.whereareiam.me/development")
}
Expand All @@ -35,3 +37,58 @@ tasks.register("pluginJars") {
":provider-premium-runtime:shadowJar"
)
}

val validatePipelineStructure = tasks.register("validatePipelineStructure") {
group = "verification"
description = "Validates pipeline package layout conventions."

doLast {
val errors = mutableListOf<String>()
val mainSources = fileTree(projectDir) {
include("identica-*/**/src/main/java/**/*.java")
exclude("**/build/**")
}

mainSources.files.sortedBy { it.invariantSeparatorsPath }.forEach { file ->
val path = file.invariantSeparatorsPath
val text = file.readText()

if ("/pipeline/scenario/base/" in path) {
errors += "Top-level scenario/base is forbidden: $path"
}

if (path.contains("/pipeline/") && path.contains("/base/") &&
!Regex("""\babstract\s+class\b""").containsMatchIn(text)
) {
errors += "Only abstract classes may live in base packages: $path"
}

val pipelineParticipantOutsidePipeline =
(path.contains("/identica-provider/") || path.contains("/identica-capability/")) &&
!path.contains("/pipeline/") &&
listOf(
"implements PipelineExtension",
"implements PipelinePhase<",
"extends InteractiveStep",
"extends SeamlessStep"
).any(text::contains)

if (pipelineParticipantOutsidePipeline) {
errors += "Pipeline-participating provider/capability class must live under pipeline/: $path"
}
}

if (errors.isNotEmpty()) {
throw GradleException(buildString {
appendLine("Pipeline structure validation failed:")
errors.forEach { appendLine(" - $it") }
})
}
}
}

subprojects {
tasks.matching { it.name == "check" }.configureEach {
dependsOn(validatePipelineStructure)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
enabled: true
eligibility:
untrustedIps:
enabled: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
providers:
- id: premium
capabilities:
restriction:
join:
enabled: true
allow:
- linked
- recognized
- id: credential
capabilities:
restriction:
join:
enabled: true
allow:
- linked
- recognized

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
enabled: true
eligibility:
untrustedIps:
enabled: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
providers:
- id: premium
capabilities:
restriction:
join:
enabled: true
allow:
- linked
- recognized
- id: credential
capabilities:
restriction:
join:
enabled: true
allow:
- linked
- recognized

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
enabled: true
eligibility:
untrustedIps:
enabled: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
providers:
- id: premium
capabilities:
restriction:
join:
enabled: true
allow:
- linked
- recognized
- id: credential
capabilities:
restriction:
join:
enabled: true
allow:
- linked
- recognized

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
enabled: true
eligibility:
untrustedIps:
enabled: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
providers:
- id: premium
capabilities:
restriction:
join:
enabled: true
allow:
- linked
- recognized
- id: credential
capabilities:
restriction:
join:
enabled: true
allow:
- linked
- recognized

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
enabled: true
eligibility:
untrustedIps:
enabled: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
providers:
- id: premium
capabilities:
restriction:
join:
enabled: true
allow:
- linked
- recognized
- id: credential
capabilities:
restriction:
join:
enabled: true
allow:
- linked
- recognized

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
enabled: true
eligibility:
untrustedIps:
enabled: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
providers:
- id: premium
capabilities:
restriction:
join:
enabled: true
allow:
- linked
- recognized
- id: credential
capabilities:
restriction:
join:
enabled: true
allow:
- linked
- recognized

This file was deleted.

18 changes: 18 additions & 0 deletions docs/content/addons/community/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
title: Community Addons
description: Entry point for community-maintained addons.
---

Community addons are plugins made by the community and not maintained by Identica developers.
They extend Identica without acting as providers themselves.

This page is the routing point for unofficial and community-maintained Identica addons.

## Add an addon

If you want a community addon to be listed here, request it through one of these channels:

- [Discord](https://discord.arcadeya.com)
- [GitHub Issues or Pull Requests](https://github.com/whereareiam/Identica)

Community addons can eventually be listed here as internal docs pages, external documentation links, or both.
24 changes: 24 additions & 0 deletions docs/content/addons/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: Addons
description: Discover plugins that extend Identica without acting as providers.
---

Addons are plugins that extend Identica without acting as providers themselves.

Identica has two addon groups:

- official addons maintained by Identica developers
- community addons made by the community and not maintained by Identica developers

Community addons may integrate with other plugins, change runtime behavior, or come with their own release and support expectations.
Review them carefully before you install them.

## Addon discovery

Use these pages to discover addon plugins:

- [Official addons](./official/index.md)
- [Community addons](./community/index.md)

Some addons may be documented directly in this docs site.
Others may link out to separate documentation maintained elsewhere.
8 changes: 8 additions & 0 deletions docs/content/addons/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"title": "Addons",
"pages": [
"index",
"official",
"community"
]
}
6 changes: 6 additions & 0 deletions docs/content/addons/official/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Official Addons
description: Addons maintained by Identica developers.
---

Official addons are plugins maintained by Identica developers that extend Identica without acting as providers.
Loading
Loading