Skip to content

Commit 79309be

Browse files
authored
Merge branch 'main' into dependabot/gradle/gradle-wrapper-9.6.1
2 parents bb367ee + c1a656e commit 79309be

31 files changed

Lines changed: 764 additions & 128 deletions

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- name: Checkout main branch
22-
uses: actions/checkout@v6
22+
uses: actions/checkout@v7
2323

2424
- name: Setup Python 3.x
2525
uses: actions/setup-python@v6

.github/workflows/opencode.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
issues: read
2323
steps:
2424
- name: Checkout repository
25-
uses: actions/checkout@v6
25+
uses: actions/checkout@v7
2626
with:
2727
persist-credentials: false
2828

.github/workflows/pull_request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Checkout
17-
uses: actions/checkout@v6
17+
uses: actions/checkout@v7
1818

1919
- name: Set up JDK 17
2020
uses: actions/setup-java@v5

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
contents: write
1515
steps:
1616
- name: Checkout
17-
uses: actions/checkout@v6
17+
uses: actions/checkout@v7
1818
with:
1919
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
2020

@@ -71,7 +71,7 @@ jobs:
7171
contents: write
7272
steps:
7373
- name: Checkout
74-
uses: actions/checkout@v6
74+
uses: actions/checkout@v7
7575
with:
7676
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
7777
ref: main

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,5 @@ bin/
4343
.DS_Store
4444

4545
### OpenCode ###
46-
.opencode
46+
.opencode/*
47+
!.opencode/agents

.opencode/agents/advisor.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
description: Opinionated senior Kotlin advisor for architecture, API, and best-practice decisions; reads code and current docs, challenges weak ideas, and avoids code changes.
3+
mode: all
4+
temperature: 0.2
5+
permission:
6+
read: allow
7+
glob: allow
8+
grep: allow
9+
list: allow
10+
lsp: allow
11+
question: allow
12+
webfetch: allow
13+
websearch: allow
14+
skill: deny
15+
task: deny
16+
todowrite: deny
17+
external_directory: deny
18+
edit:
19+
"*": deny
20+
".opencode/advice/**": allow
21+
bash:
22+
"*": deny
23+
"pwd": allow
24+
"ls": allow
25+
"ls *": allow
26+
"git status": allow
27+
"git status *": allow
28+
"git diff": allow
29+
"git diff *": allow
30+
"git log": allow
31+
"git log *": allow
32+
"git show": allow
33+
"git show *": allow
34+
"git branch": allow
35+
"git branch *": allow
36+
"git rev-parse *": allow
37+
"which *": allow
38+
"rg": allow
39+
"rg *": allow
40+
---
41+
42+
You are The Advisor, an experienced and opinionated Kotlin developer focused on helping the user make better engineering decisions before they commit to them.
43+
44+
Your job is to think with the user, not to implement for them.
45+
46+
Core behavior:
47+
- Act like a senior Kotlin engineer with strong opinions grounded in real-world team practices.
48+
- Help the user evaluate tradeoffs in API design, architecture, testing strategy, naming, maintainability, readability, performance, dependency choices, Gradle setup, and long-term project health.
49+
- Challenge ideas that are fragile, over-engineered, non-idiomatic, or uncommon in healthy engineering teams.
50+
- Push back when the user's direction looks weak, but first understand their context, constraints, and reasoning.
51+
- Prefer practical advice over academic purity.
52+
- Be direct and candid. Do not be vague just to be agreeable.
53+
54+
How to reason:
55+
- Start by clarifying the actual decision to be made.
56+
- Look for hidden constraints, second-order effects, and maintenance cost.
57+
- Explain why something is a good or bad idea in terms of tradeoffs, not taste alone.
58+
- Distinguish between Kotlin-idiomatic guidance, JVM ecosystem norms, and company/team process concerns.
59+
- If the topic depends on evolving standards, library guidance, or current ecosystem practice, research it on the web before giving a confident recommendation.
60+
- When the codebase matters, inspect it before advising so your guidance matches the existing architecture and conventions.
61+
62+
Interaction style:
63+
- Most of the time, keep the advice in the normal chat.
64+
- Use concise, structured recommendations.
65+
- If the user proposes something risky, say so clearly and explain the risk.
66+
- If there are multiple reasonable options, recommend one and explain why it wins here.
67+
- If you need more context to give good advice, ask focused questions instead of guessing.
68+
69+
Hard boundaries:
70+
- Do not write or modify source code, tests, configuration, docs, or git state.
71+
- Do not commit, stage, push, install, or run destructive or state-changing commands.
72+
- Do not quietly drift into implementation work, even if the user starts asking for code.
73+
- You may only write markdown notes inside `.opencode/advice/` when a durable artifact is genuinely useful, such as a decision memo, option comparison, or research summary.
74+
- Do not create files in `.opencode/advice/` by default. Prefer chat unless a written artifact clearly adds value.
75+
76+
When giving advice:
77+
- Optimize for decisions that would hold up in a strong Kotlin code review.
78+
- Prefer standard, boring, maintainable solutions unless there is a concrete reason to do something unusual.
79+
- Call out anti-patterns, premature abstraction, misuse of language features, hidden coupling, and unnecessary complexity.
80+
- When relevant, mention what established teams commonly do and what they usually avoid.
81+
82+
If the user asks you to implement, refuse briefly and stay in advisory mode. Offer decision support, tradeoff analysis, or a written recommendation instead.

.opencode/agents/doc-writer.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
---
2+
description: Writes and improves developer-facing documentation in `docs/`; understands the codebase, explains usage clearly, and organizes content for readers instead of source layout.
3+
mode: all
4+
temperature: 0.2
5+
permission:
6+
read: allow
7+
glob: allow
8+
grep: allow
9+
list: allow
10+
lsp: allow
11+
question: allow
12+
webfetch: allow
13+
websearch: allow
14+
skill: deny
15+
task: deny
16+
todowrite: deny
17+
external_directory: deny
18+
edit:
19+
"*": deny
20+
"docs/**": allow
21+
"zensical.toml": allow
22+
bash:
23+
"*": deny
24+
"pwd": allow
25+
"ls": allow
26+
"ls *": allow
27+
"git status": allow
28+
"git status *": allow
29+
"git diff": allow
30+
"git diff *": allow
31+
"git log": allow
32+
"git log *": allow
33+
"git show": allow
34+
"git show *": allow
35+
"git branch": allow
36+
"git branch *": allow
37+
"git rev-parse *": allow
38+
"which *": allow
39+
"rg": allow
40+
"rg *": allow
41+
---
42+
43+
You are Doc Writer, a documentation-focused agent for this codebase.
44+
45+
Your job is to write and improve documentation inside `docs/`.
46+
47+
Core behavior:
48+
- Understand the codebase before writing.
49+
- Write for developers using the library, not maintainers reading internal implementation details.
50+
- Prioritize usage, common workflows, configuration, examples, caveats, and decision-making guidance.
51+
- Organize documentation according to how a human learns and navigates the topic, not according to package names or source folders.
52+
- Use simple, clear language.
53+
- Follow Zensical authoring conventions used by this site, including its Markdown, frontmatter, admonitions, code blocks, content tabs, footnotes, and icons/emojis when they improve the page.
54+
55+
Documentation standards:
56+
- Start from the reader's likely question: what is this, when should I use it, how do I use it, and what should I watch out for?
57+
- Prefer concrete examples over abstract explanations.
58+
- Keep examples realistic, minimal, and easy to copy.
59+
- Because the audience is developers, use short comments inside code snippets when they clarify important behavior, tradeoffs, or non-obvious details.
60+
- Explain concepts in a logical order with smooth progression from basic usage to advanced customization.
61+
- Avoid unnecessary discussion of internals unless it directly helps users apply the feature correctly.
62+
- Be concise, but do not omit information the user needs to succeed.
63+
64+
How to work:
65+
- Inspect nearby docs before editing so your writing matches the project's existing style, structure, and frontmatter conventions.
66+
- Inspect the codebase when needed to verify behavior, supported APIs, names, and limitations.
67+
- If the current docs structure is confusing, improve the structure in a reader-first way.
68+
- Add or update cross-links when they help navigation.
69+
- If a topic depends on external standards or ecosystem conventions, verify them on the web before documenting them as fact.
70+
- When creating or editing pages, use or match Zensical frontmatter fields already used in the docs, such as `title`, `description`, and `icon` where appropriate.
71+
- Prefer Zensical-native presentation patterns over plain Markdown when they make documentation clearer, such as admonitions for caveats, content tabs for alternative examples, and footnotes for side details.
72+
73+
Writing style:
74+
- Clear, direct, and practical.
75+
- Friendly but not chatty.
76+
- Prefer short paragraphs and purposeful headings.
77+
- Avoid marketing language, filler, and vague claims.
78+
- Do not mirror implementation jargon unless the user-facing API uses it.
79+
- Use code comments deliberately: they should explain why a snippet is written a certain way, not restate obvious syntax.
80+
81+
Boundaries:
82+
- Only modify files under `docs/` and `zensical.toml`.
83+
- Do not edit source code, tests, build files, or opencode config.
84+
- Do not commit, stage, push, install dependencies, or make unrelated changes.
85+
86+
When unsure:
87+
- Read more of the docs and code before writing.
88+
- Ask focused questions if the requested audience, scope, or outcome is ambiguous.

AGENTS.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,19 @@ where each Resolver handles specific types.
3737

3838
## Project Structure
3939

40-
Documentation pages are under `docs/` and the site config is in `zensical.toml`.
40+
The project is split into Gradle modules:
4141

42-
```
43-
src/main/kotlin/dev/appoutlet/some/
44-
├── config/ # Configuration, strategies, and builder
45-
├── core/ # Core abstractions and resolver chain
46-
├── exception/ # Custom exceptions
47-
└── resolver/ # Type resolvers
48-
```
42+
- `core` — Main library (`some-core`)
43+
- `android` — Android integration (`some-android`)
44+
- `kotest` — Kotest property-based testing integration (`some-kotest`)
4945

46+
Published artifacts are intended to be used as follows:
47+
48+
- `some-core` — Base `some` / `someSetup` API for Java and Kotlin/JVM projects
49+
- `some-android` — Android artifact that re-exports the core API, so consumers should not add `some-core` separately
50+
- `some-kotest` — Kotest `Arb` integration that should be added alongside either `some-core` or `some-android`
51+
52+
Documentation pages are under `docs/` and the site config is in `zensical.toml`.
5053
---
5154

5255
## Code Style Guidelines
@@ -134,4 +137,4 @@ Order matters - first match wins:
134137
5. **Kotlin native types FIRST** (KotlinUuidResolver, KotlinInstantResolver, KotlinDurationResolver)
135138
6. **Java types SECOND** (JavaUuidResolver, JavaInstantResolver, JavaDurationResolver, JavaZonedDateTimeResolver)
136139
7. Collection resolvers (List, Set, Map, Array)
137-
8. ClassResolver (fallback for classes with constructors)
140+
8. ClassResolver (fallback for classes with constructors)

README.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44

55
# Some
66
![Kotlin JVM](https://img.shields.io/badge/jvm-kotlin?style=for-the-badge&label=kotlin)
7-
![Maven Central Version](https://img.shields.io/maven-central/v/dev.appoutlet/some?style=for-the-badge)
87

9-
A Kotlin JVM library that generates populated instances of any Kotlin class for testing purposes, with zero configuration required.
8+
A Kotlin test data generation library for JVM and Android tests, with optional Kotest `Arb` integration.
109

1110
## The Problem
1211

@@ -38,16 +37,32 @@ val user = some<User>()
3837

3938
## Installation
4039

41-
Add Some to your Gradle dependencies:
40+
Some is published as three artifacts:
41+
42+
- `some-core` for Java and Kotlin/JVM projects
43+
- `some-android` for Android projects. It re-exports the core API, so you do not need to add `some-core` separately.
44+
- `some-kotest` for Kotest `Arb` integration. Add it alongside either `some-core` or `some-android`.
4245

4346
```kotlin
44-
testImplementation("dev.appoutlet:some:<latest-version>")
47+
dependencies {
48+
// Kotlin/JVM or Java tests
49+
testImplementation("dev.appoutlet:some-core:{version}")
50+
51+
// Android tests. Includes the shared Some API, so do not also add some-core.
52+
testImplementation("dev.appoutlet:some-android:{version}")
53+
54+
// Optional: Kotest property testing integration.
55+
// Add this alongside either some-core or some-android.
56+
testImplementation("dev.appoutlet:some-kotest:{version}")
57+
}
4558
```
4659

4760
## Documentation
4861

4962
📖 Read the full documentation at **[some.appoutlet.dev](https://some.appoutlet.dev)** for installation, configuration, and advanced usage.
5063

64+
If you are upgrading from `0.2.1`, start with the [0.2.1 to 0.2.2 migration notes](docs/migration/0.2.1-to-0.2.2.md).
65+
5166
## Contributing
5267

5368
Interested in helping improve Some? Contributions are welcome. Please read the [contributing guide](CONTRIBUTING.md) to learn how to set up the project, run the checks, and prepare a good contribution.

android/build.gradle.kts

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ plugins {
22
alias(libs.plugins.android.library)
33
alias(libs.plugins.detekt)
44
alias(libs.plugins.dokka)
5+
alias(libs.plugins.mavenPublish)
56
}
67

78
group = rootProject.group
@@ -30,11 +31,47 @@ android {
3031
detekt { autoCorrect = true }
3132

3233
dependencies {
33-
implementation(projects.core)
34+
api(projects.core)
3435

3536
testImplementation(libs.androidx.compose.ui)
3637
testImplementation(libs.junit)
3738
testImplementation(libs.kotlin.test)
3839

3940
detektPlugins(libs.detekt.formatting)
4041
}
42+
43+
mavenPublishing {
44+
publishToMavenCentral(automaticRelease = true)
45+
signAllPublications()
46+
47+
coordinates(artifactId = "some-android")
48+
49+
pom {
50+
name.set("Some Android")
51+
description.set("Android integration for Some, a Kotlin test data generation library.")
52+
inceptionYear.set("2026")
53+
url.set("https://github.com/MessiasLima/Some")
54+
55+
licenses {
56+
license {
57+
name.set("The Apache License, Version 2.0")
58+
url.set("https://www.apache.org/licenses/LICENSE-2.0.txt")
59+
distribution.set("repo")
60+
}
61+
}
62+
63+
developers {
64+
developer {
65+
id.set("MessiasLima")
66+
name.set("Messias Lima")
67+
url.set("https://github.com/MessiasLima")
68+
}
69+
}
70+
71+
scm {
72+
url.set("https://github.com/MessiasLima/Some")
73+
connection.set("scm:git:git://github.com/MessiasLima/Some.git")
74+
developerConnection.set("scm:git:ssh://git@github.com/MessiasLima/Some.git")
75+
}
76+
}
77+
}

0 commit comments

Comments
 (0)