andoriyaprashant / andoriyaprashant/OpSo

feat: `.gradle/` directory and `build.gradle` files are committed — these are Android build artifacts that should be gitignored, causing unnecessary repository bloat and platform-specific conflicts

未关闭
#487 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Dart
星标
53
派生
108
PR 合并指标
30 天内没有已合并 PR

描述

## 🐛 Problem Statement

The OpSo repository contains committed Android build artifacts:

- `.gradle/` directory — Gradle build cache and wrapper state (machine-specific, binary files)
- `build.gradle` at the root — This appears to be committed separately from `android/build.gradle`
- `local.properties` — Contains the **local SDK path** (e.g., `/Users/developer/Library/Android/sdk`) which is 100% machine-specific and must never be in version control

Specifically, `local.properties` leaks:
- The original developer's home directory name (e.g., `sdk.dir=/Users/andoriya/Library/Android/sdk`)
- Operating system (Linux vs macOS vs Windows path format)

Every contributor who clones the repo will have a different Android SDK location and must overwrite `local.properties` manually — a confusing step especially for beginners.

## Fix Required

```bash
# Step 1: Remove from git tracking
git rm --cached local.properties
git rm --cached -r .gradle/
# Note: Do NOT remove android/build.gradle — that's part of the project

# Step 2: Add proper Flutter .gitignore entries
cat >> .gitignore << 'EOF'
# Android build files
local.properties
.gradle/
android/.gradle/

# Flutter build output
build/
.dart_tool/

# iOS build
ios/.symlinks/
ios/Pods/
*.lock (for Pods)

# macOS
macos/.symlinks/
EOF

git commit -m "chore: remove machine-specific build artifacts from version control"
```

**Also add to `README.md`** a note that contributors need to create their own `local.properties`:

```markdown
## Setup Note for Android Development
After cloning, create `local.properties` in the root with your SDK path:
```
sdk.dir=/path/to/your/android/sdk
This file is gitignored and must be created locally.

## Files to Modify

| File | Change |
|---|---|
| `.gradle/` | Remove from git tracking |
| `local.properties` | Remove from git tracking (machine-specific SDK path) |
| `.gitignore` | Add `.gradle/`, `local.properties`, Flutter build patterns |
| `README.md` | Add "Setup Note for Android Development" |

**Suggested labels:** `chore`, `good first issue`, `documentation`

I would like to work on this. Could you please assign it to me?

贡献指南

打开贡献指南

调研方向

Review .gitignore, the tracked .gradle/ directory, local.properties, and README.md first; confirm which Android and Flutter artifacts are currently committed. Remove only machine-specific artifacts from tracking, preserve android/build.gradle, add the requested ignore patterns, and document local.properties setup in README.md. Verify the final git status and that the repository no longer tracks those local files.

由索引模型根据 Issue 内容生成。

评估

技术栈
android, dart, flutter, git
领域
build-system, documentation, mobile
Issue 类型
重构
难度
3/5
预计耗时
1-2 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
68/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。