Skip to content

Commit d8557f6

Browse files
CopilotShreckYe
andcommitted
Enhance .github/copilot-instructions.md with patterns from kotlin-common project
Co-authored-by: ShreckYe <[email protected]>
1 parent 1fb222d commit d8557f6

File tree

1 file changed

+35
-3
lines changed

1 file changed

+35
-3
lines changed

.github/copilot-instructions.md

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,21 @@
1212
- **Key Dependencies**: Compose Multiplatform, Kobweb Silk, Material Web Components
1313
- **Current Version**: 0.6.0-SNAPSHOT
1414

15+
<tool_calling>
16+
You have the capability to call multiple tools in a single response. For maximum efficiency, whenever you need to perform multiple independent operations, ALWAYS invoke all relevant tools simultaneously rather than sequentially. Especially when exploring repository, reading files, viewing directories, validating changes or replying to comments.
17+
</tool_calling>
18+
1519
## Build Instructions and Environment Setup
1620

1721
### Prerequisites
1822
- **JDK 17**: Required (as specified in GitHub Actions workflows)
19-
- **Network Access**: Required for initial builds to download Android Gradle Plugin and Kobweb dependencies
23+
- **Network Access**: Required for initial builds to download Android Gradle Plugin and other dependencies
2024
- **Gradle 9.1.0**: Automatically handled by wrapper
2125

26+
**IMPORTANT**: Initial builds require internet access for dependency resolution. The project cannot build in fully offline environments.
27+
28+
**IMPORTANT**: If the project uses snapshot dependencies of other `com.huanshankeji` libraries, especially in a branch other than `main` such as `dev`, refer to the setup instructions at <https://github.com/huanshankeji/.github/blob/main/dev-instructions.md#about-snapshot-dependencies-of-our-library-projects>.
29+
2230
### Essential Repository Setup
2331

2432
No special repository setup is required - all dependencies are available from standard repositories (mavenCentral, google).
@@ -36,7 +44,7 @@ No special repository setup is required - all dependencies are available from st
3644
```
3745
**Important**: Always run `publishToMavenLocal` first when making changes, as mentioned in CONTRIBUTING.md. This publishes libraries to your local Maven repository so dependent projects can use your changes.
3846

39-
#### 3. Running Tests and Checks
47+
#### 3. Running Tests and Checks (Essential Commands - validated and working)
4048
```bash
4149
./gradlew check
4250
```
@@ -67,6 +75,20 @@ No special repository setup is required - all dependencies are available from st
6775

6876
4. **Gradle Daemon**: May timeout on first runs. Use `--no-daemon` flag if needed: `./gradlew check --no-daemon`
6977

78+
### Build Timing and Known Issues
79+
80+
**Timing Expectations**:
81+
- First build: 5-10 minutes (includes dependency resolution and Wasm compilation)
82+
- Subsequent builds: 1-3 minutes
83+
- `publishToMavenLocal`: 3-5 minutes
84+
- `check` execution: 2-5 minutes (limited tests)
85+
- Demo builds: 2-4 minutes
86+
87+
**Common Issues**:
88+
- **Wasm Compilation**: Requires 2GB+ heap memory (pre-configured in gradle.properties)
89+
- **Network Dependencies**: Cannot build offline, requires internet for initial setup
90+
- **Platform-specific builds**: Some targets may be disabled on certain OS (use `--continue` flag)
91+
7092
## Project Architecture and Layout
7193

7294
### Module Structure
@@ -125,6 +147,8 @@ repositories {
125147
}
126148
```
127149

150+
**Note**: All dependencies are available from standard repositories. If working with snapshot dependencies of other `com.huanshankeji` libraries, additional setup may be required as per organization instructions.
151+
128152
#### Key Dependencies
129153
- **Kotlin**: 2.2.20 with Compose Compiler
130154
- **Compose Multiplatform**: 1.9.0
@@ -157,6 +181,12 @@ repositories {
157181
- **Code Style**: IntelliJ IDEA Code Cleanup and Reformat Code applied project-wide
158182
- **Limited Testing**: Project acknowledges "limited number of tests"
159183

184+
#### Architecture Notes
185+
- **Multi-module**: Each feature area is a separate Gradle subproject
186+
- **Expect/Actual Pattern**: Platform-specific implementations using Kotlin Multiplatform patterns
187+
- **Convention Plugins**: Custom build logic in `buildSrc` for consistency across modules
188+
- **Target Platforms**: Sophisticated setup targeting 6+ platforms with different implementation strategies
189+
160190
### Root Directory Files
161191
```
162192
.gitignore # Standard exclusions plus .kotlin, local.properties
@@ -185,4 +215,6 @@ settings.gradle.kts # Project structure and dependency management
185215
- **Network Dependency**: Initial builds require internet access - cannot work in fully offline environments
186216
- **Memory Requirements**: Ensure adequate memory for Wasm compilation (2GB JVM heap configured)
187217
- **Limited Test Coverage**: Don't expect comprehensive test suites - focus on build and demo validation
188-
- **Platform Complexity**: This is a sophisticated multiplatform project with 6+ target platforms and complex expect/actual patterns
218+
- **Platform Complexity**: This is a sophisticated multiplatform project with 6+ target platforms and complex expect/actual patterns
219+
220+
**Trust these instructions**: This information has been validated through actual command execution and file inspection. Only search for additional information if these instructions are incomplete or found to be incorrect.

0 commit comments

Comments
 (0)