Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
9866f5d
chore: add junie guidelines
Anty0 Jun 19, 2025
e4e206d
refactor: getting ready for production - part 1
Anty0 Jul 14, 2025
fb9cae3
refactor: public api for Tolgee instance
Anty0 Jul 14, 2025
62cc689
refactor: provide non-nullable singleton instance
Anty0 Jul 14, 2025
0e2983b
refactor: better match naming of Context extensions
Anty0 Jul 14, 2025
14ac5ca
refactor: deduplicate visit function
Anty0 Jul 14, 2025
afd2385
feat: add StorageProvider support + docs fixes
Anty0 Jul 14, 2025
3401b35
feat: implemented storage
Anty0 Jul 14, 2025
00c3091
feat: remove tolgee-cli gradle plugin for now
Anty0 Jul 14, 2025
f34d3ce
chore: missing doc
Anty0 Jul 14, 2025
cc51b80
chore: update demo applications
Anty0 Jul 14, 2025
7c3e189
fix: update api description
Anty0 Jul 14, 2025
1dd3050
fix: proper order of storage handling - prefer fresh
Anty0 Jul 15, 2025
47d0ba6
feat: CDN and .tolgeerc for examples
Anty0 Jul 17, 2025
40cfbdf
feat: add language change to android demo
Anty0 Jul 17, 2025
a416db3
feat: compiler demo + fixes
Anty0 Jul 17, 2025
d38f8be
feat: demo fixups, remove flow demo
Anty0 Jul 28, 2025
7b9b764
feat: android jetpack demo
Anty0 Jul 28, 2025
35ef3ce
feat: bit more docs within demos
Anty0 Jul 28, 2025
708690e
feat: plurals support Sprintf format + plurals params fixes
Anty0 Jul 30, 2025
fb7178e
feat: rename root module and repository
Anty0 Aug 4, 2025
b64bf8b
feat: update package/namespace name + update version
Anty0 Aug 4, 2025
7e135e3
feat: update README + rollback version + small fixes
Anty0 Aug 4, 2025
a0b668e
fix: update compiler plugin group id
Anty0 Aug 4, 2025
ebdce57
chore: add Tolgee mouse to readme
Anty0 Aug 4, 2025
11230b4
chore: update contributing with link to guidelines + add contributors…
Anty0 Aug 4, 2025
cd83e74
fix: update api spec
Anty0 Aug 4, 2025
f246278
chore: fix guidelines link name
Anty0 Aug 4, 2025
51c9e09
fix: imports for compose multiplatform demo
Anty0 Aug 4, 2025
b1b444e
fix: typo in package name
Anty0 Aug 4, 2025
bca6daa
fix: duplicated buildFeatures in demo
Anty0 Aug 4, 2025
1333901
chore: remove api compatibility warning
Anty0 Aug 4, 2025
1263e92
chore: add note about using tolgee-cli for updating fallback strings
Anty0 Aug 5, 2025
a35a4c0
chore: fix link + better design
Anty0 Aug 5, 2025
baaedc9
chore: note the presence of tolgeerc configuration examples
Anty0 Aug 5, 2025
614e290
chore: add android permissions note to docs
Anty0 Aug 5, 2025
2cb6eec
Revert "chore: add android permissions note to docs"
Anty0 Aug 5, 2025
44fc14a
fix: review fixes
Anty0 Aug 5, 2025
0558232
chore: add section about network config to the readmes
Anty0 Aug 11, 2025
694544f
feat: callback interface for translation changes
Anty0 Aug 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
158 changes: 158 additions & 0 deletions .junie/guidelines.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
# Development Guidelines for Tolgee Mobile Kotlin SDK

This document provides essential information for developers working on the Tolgee Mobile Kotlin SDK project.

## Build/Configuration Instructions

### Project Structure

The project consists of several modules:

- **core**: The Kotlin Multiplatform library providing runtime support for Tolgee translations
- **compose**: Compose Multiplatform integration for Tolgee
- **compiler-plugin**: Kotlin compiler plugin for Tolgee
- **gradle-plugin**: Gradle plugin for integrating Tolgee into projects
- **demo**: Demo applications showcasing Tolgee usage

### Building the Project

1. **Prerequisites**:
- JDK 11 or higher
- Kotlin 1.9.0 or higher
- Android SDK (for Android targets)
- Xcode (for Apple targets)

2. **Building from the command line**:
```bash
./gradlew build
```

3. **Building specific modules**:
```bash
./gradlew :core:build
./gradlew :compose:build
./gradlew :gradle-plugin:build
./gradlew :compiler-plugin:build
```

4. **Publishing to Maven Local** (for local testing):
```bash
./gradlew publishToMavenLocal
```
You may need to disable signing temporarily as it is enforced by default.

## Testing Information

Testing infrastructure is in a relatively ok state, but there are no tests at the moment.

### Running Tests

Tests can be run using the Gradle test task:

```bash
# Run all tests
./gradlew test

# Run tests for a specific module
./gradlew :gradle-plugin:test
./gradlew :core:test
./gradlew :compose:test
./gradlew :compiler-plugin:test

# Run a specific test class
./gradlew :gradle-plugin:test --tests "TolgeeTest"

# Run a specific test method
./gradlew :gradle-plugin:test --tests "TolgeeTest.tolgee cli version check"
```

### Adding New Tests

1. **Create a test file** in the appropriate module's test directory:
- For JVM modules: `<module>/src/test/kotlin/`
- For Android modules: `<module>/src/androidTest/kotlin/`
- For multiplatform modules: `<module>/src/commonTest/kotlin/` (or platform-specific test directories)

2. **Test structure example**:

```kotlin
class MyTest {

@Test
fun `test some functionality`() {
// Test implementation
assertEquals(expected, actual, "Error message")
}
}
```

3. **Running your new test**:
```bash
./gradlew :<module>:test --tests "MyTest"
```

### Test Example

Here's a simple test example that was created and verified to work:

```kotlin
class SimpleTest {

@Test
fun `simple addition test`() {
// A simple test to demonstrate testing in this project
assertEquals(4, 2 + 2, "Basic addition should work correctly")
}
}
```

## Additional Development Information

### Code Style

- The project follows Kotlin coding conventions
- Use 4 spaces for indentation
- The maximum line length is 120 characters (not fully enforced at the moment)
- Use trailing commas in parameter lists and collection literals that span multiple lines

### Multiplatform Considerations

- Common code should be placed in `commonMain` source sets
- Platform-specific code should be placed in the appropriate platform-specific source sets:
- `androidMain` for Android
- `jvmMain` for JVM
- `appleMain` for Apple platforms (iOS, macOS, etc.)
- `jsMain` for JavaScript
- etc.

### Dependency Management

- Dependencies are managed through Version Catalog in `gradle/libs.versions.toml`
- When adding new dependencies, add them to the Version Catalog rather than directly in build scripts

### Publishing

The project uses the Vanniktech Maven Publish plugin for publishing to Maven Central:

```kotlin
mavenPublishing {
publishToMavenCentral(host = SonatypeHost.CENTRAL_PORTAL, automaticRelease = true)
signAllPublications()

coordinates(
groupId = "io.tolgee",
artifactId = "module-name",
version = "version"
)
}
```

### API Compatibility

The project uses the Binary Compatibility Validator plugin to ensure API compatibility. After making changes to public APIs, run:

```bash
./gradlew apiDump
```

This will update the API dump files in the `api` directory of each module. These files should be committed to the repository.
Loading
Loading