Skip to content

Commit

Permalink
[GH] Move playground projects into a separate folder
Browse files Browse the repository at this point in the history
This PR updates the GitHub setup to position playground projects outside the main project structure.

This is done for 2 reasons:

* Running `gw` (gradle shortcut that finds the closest gradlew) would match the playground gradlew even when the developer is not using playground
* Android studio would pick the playground settings.gradle file when running jvm tests from studio's gutter icon. This caused a lot of confusion for developers as it might run with different dependencies, confuse studio etc.

This updates moves them into playground-projects folder, also names each one as `projectName-playground` to further avoid any confusion with the parent project (e.g. :room gets included automatically when :room-common is included, we don't want it to conflict with the playground root project).

I updated the workflow files to use the new setup (PR will fail on target since it will use the old workflow file)
I've also added an empty playground project to run ktlint on CI so that it doesn't get affected by other projects.

Bug: n/a
Test: CI

This is an imported pull request from #624.

Resolves #624
Github-Pr-Head-Sha: ebfcbba
GitOrigin-RevId: c1db28e
Change-Id: I6c2176678187dc5f043cdb4391496ee372834c7f
  • Loading branch information
yigit authored and copybara-github committed Nov 1, 2023
1 parent 14f0ece commit 3279445
Show file tree
Hide file tree
Showing 317 changed files with 269 additions and 168 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,14 @@ jobs:

# Limit the size of the cache entry.
# These directories contain instrumented/transformed dependency jars which can be reconstructed relatively quickly.
gradle-home-cache-excludes: |
gradle-home-cache-excludes: |
caches/jars-9
caches/transforms-3
- name: "ktlint"
env:
JAVA_HOME: ${{ steps.setup-java.outputs.path }}
working-directory: activity
working-directory: playground-projects/ktlint-playground
run: ./gradlew -q :ktlintCheckFile ${{ steps.ktlint-file-args.outputs.ktlint-file-args }} ${{ needs.setup.outputs.gradlew_flags }}

build-modules:
Expand All @@ -126,7 +126,7 @@ jobs:
needs: [setup, lint]
env:
artifact-id: ${{matrix.project}}
project-root: ${{matrix.project-root || matrix.project}}
project-root: playground-projects/${{matrix.project-root || matrix.project}}-playground
GRADLE_BUILD_CACHE_PASSWORD: ${{ secrets.GRADLE_BUILD_CACHE_PASSWORD }}
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
steps:
Expand All @@ -145,7 +145,7 @@ jobs:
if: ${{ steps.check-ci-config.outputs.enabled == 'true' }}
with:
project: ${{ matrix.project }}
project-root: ${{matrix.project-root || matrix.project }}
project-root: ${{ env.project-root }}
gradle-cache-password: ${{ secrets.GRADLE_BUILD_CACHE_PASSWORD }}
gradle-enterprise-access-key: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
gradle-flags: ${{ needs.setup.outputs.gradlew_flags }}
Expand Down
7 changes: 5 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ creating a fork of the [androidx/androidx](https://github.com/androidx/androidx)

- Download and install JDK 17, if you don’t have it already.

Note the installation directory. If you already have JDK 17 installed and set as default, you can
Note the installation directory. If you already have JDK 17 installed and set as default, you can
find this with `which javac`.

- Download and install [Android Studio](https://developer.android.com/studio) if you don't have it
Expand Down Expand Up @@ -85,6 +85,9 @@ androidx
-- work
```

To avoid conflict with the main project, these sub project groups are located under the
`playground-projects` folder.

**Note:** For other projects, you will still need to use the Gerrit workflow used by the Android Open Source Project (AOSP). For more information, please look at the [README](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:README.md).

Fork the [androidx/androidx](https://github.com/androidx/androidx) repository.
Expand All @@ -109,7 +112,7 @@ Let’s assume that you want to make a contribution to Room. The first step is t
First launch Android Studio using:

```bash
cd androidx/room
cd playground-projects/room-playground
# This will automatically launch the `room` project in Android Studio.
./gradlew studio
```
Expand Down
1 change: 0 additions & 1 deletion activity/.idea/codeStyles/Project.xml

This file was deleted.

1 change: 0 additions & 1 deletion activity/.idea/codeStyles/codeStyleConfig.xml

This file was deleted.

1 change: 0 additions & 1 deletion activity/.idea/copyright/AndroidCopyright.xml

This file was deleted.

1 change: 0 additions & 1 deletion activity/.idea/copyright/profiles_settings.xml

This file was deleted.

1 change: 0 additions & 1 deletion activity/.idea/inspectionProfiles/Project_Default.xml

This file was deleted.

1 change: 0 additions & 1 deletion activity/.idea/scopes/Ignore_API_Files.xml

This file was deleted.

1 change: 0 additions & 1 deletion activity/.idea/scopes/buildSrc.xml

This file was deleted.

1 change: 0 additions & 1 deletion activity/gradle

This file was deleted.

1 change: 0 additions & 1 deletion activity/gradle.properties

This file was deleted.

1 change: 0 additions & 1 deletion activity/gradlew

This file was deleted.

1 change: 0 additions & 1 deletion activity/gradlew.bat

This file was deleted.

1 change: 0 additions & 1 deletion appcompat/.idea/codeStyles/Project.xml

This file was deleted.

1 change: 0 additions & 1 deletion appcompat/.idea/codeStyles/codeStyleConfig.xml

This file was deleted.

1 change: 0 additions & 1 deletion appcompat/.idea/copyright/AndroidCopyright.xml

This file was deleted.

1 change: 0 additions & 1 deletion appcompat/.idea/copyright/profiles_settings.xml

This file was deleted.

1 change: 0 additions & 1 deletion appcompat/.idea/inspectionProfiles/Project_Default.xml

This file was deleted.

1 change: 0 additions & 1 deletion appcompat/.idea/scopes/Ignore_API_Files.xml

This file was deleted.

1 change: 0 additions & 1 deletion appcompat/.idea/scopes/buildSrc.xml

This file was deleted.

1 change: 0 additions & 1 deletion appcompat/gradle

This file was deleted.

1 change: 0 additions & 1 deletion appcompat/gradle.properties

This file was deleted.

1 change: 0 additions & 1 deletion appcompat/gradlew

This file was deleted.

1 change: 0 additions & 1 deletion appcompat/gradlew.bat

This file was deleted.

1 change: 0 additions & 1 deletion biometric/.idea/codeStyles/Project.xml

This file was deleted.

1 change: 0 additions & 1 deletion biometric/.idea/codeStyles/codeStyleConfig.xml

This file was deleted.

1 change: 0 additions & 1 deletion biometric/.idea/copyright/AndroidCopyright.xml

This file was deleted.

1 change: 0 additions & 1 deletion biometric/.idea/copyright/profiles_settings.xml

This file was deleted.

1 change: 0 additions & 1 deletion biometric/.idea/inspectionProfiles/Project_Default.xml

This file was deleted.

1 change: 0 additions & 1 deletion biometric/.idea/scopes/Ignore_API_Files.xml

This file was deleted.

1 change: 0 additions & 1 deletion biometric/.idea/scopes/buildSrc.xml

This file was deleted.

1 change: 0 additions & 1 deletion biometric/gradle

This file was deleted.

1 change: 0 additions & 1 deletion biometric/gradle.properties

This file was deleted.

1 change: 0 additions & 1 deletion biometric/gradlew

This file was deleted.

1 change: 0 additions & 1 deletion biometric/gradlew.bat

This file was deleted.

1 change: 0 additions & 1 deletion collection/.idea/codeStyles/Project.xml

This file was deleted.

1 change: 0 additions & 1 deletion collection/.idea/codeStyles/codeStyleConfig.xml

This file was deleted.

1 change: 0 additions & 1 deletion collection/.idea/copyright/AndroidCopyright.xml

This file was deleted.

1 change: 0 additions & 1 deletion collection/.idea/copyright/profiles_settings.xml

This file was deleted.

1 change: 0 additions & 1 deletion collection/.idea/inspectionProfiles/Project_Default.xml

This file was deleted.

1 change: 0 additions & 1 deletion collection/.idea/scopes/Ignore_API_Files.xml

This file was deleted.

1 change: 0 additions & 1 deletion collection/.idea/scopes/buildSrc.xml

This file was deleted.

1 change: 0 additions & 1 deletion collection/gradle

This file was deleted.

1 change: 0 additions & 1 deletion collection/gradle.properties

This file was deleted.

1 change: 0 additions & 1 deletion collection/gradlew

This file was deleted.

1 change: 0 additions & 1 deletion collection/gradlew.bat

This file was deleted.

1 change: 0 additions & 1 deletion core/.idea/codeStyles/Project.xml

This file was deleted.

1 change: 0 additions & 1 deletion core/.idea/codeStyles/codeStyleConfig.xml

This file was deleted.

1 change: 0 additions & 1 deletion core/.idea/copyright/AndroidCopyright.xml

This file was deleted.

1 change: 0 additions & 1 deletion core/.idea/copyright/profiles_settings.xml

This file was deleted.

1 change: 0 additions & 1 deletion core/.idea/inspectionProfiles/Project_Default.xml

This file was deleted.

1 change: 0 additions & 1 deletion core/.idea/scopes/Ignore_API_Files.xml

This file was deleted.

1 change: 0 additions & 1 deletion core/.idea/scopes/buildSrc.xml

This file was deleted.

1 change: 0 additions & 1 deletion core/gradle

This file was deleted.

1 change: 0 additions & 1 deletion core/gradle.properties

This file was deleted.

1 change: 0 additions & 1 deletion core/gradlew

This file was deleted.

1 change: 0 additions & 1 deletion core/gradlew.bat

This file was deleted.

1 change: 0 additions & 1 deletion datastore/.idea/codeStyles/Project.xml

This file was deleted.

1 change: 0 additions & 1 deletion datastore/.idea/codeStyles/codeStyleConfig.xml

This file was deleted.

1 change: 0 additions & 1 deletion datastore/.idea/copyright/AndroidCopyright.xml

This file was deleted.

1 change: 0 additions & 1 deletion datastore/.idea/copyright/profiles_settings.xml

This file was deleted.

1 change: 0 additions & 1 deletion datastore/.idea/inspectionProfiles/Project_Default.xml

This file was deleted.

1 change: 0 additions & 1 deletion datastore/.idea/scopes/Ignore_API_Files.xml

This file was deleted.

1 change: 0 additions & 1 deletion datastore/.idea/scopes/buildSrc.xml

This file was deleted.

1 change: 0 additions & 1 deletion datastore/gradle

This file was deleted.

1 change: 0 additions & 1 deletion datastore/gradle.properties

This file was deleted.

1 change: 0 additions & 1 deletion datastore/gradlew

This file was deleted.

1 change: 0 additions & 1 deletion datastore/gradlew.bat

This file was deleted.

1 change: 0 additions & 1 deletion fragment/.idea/codeStyles/Project.xml

This file was deleted.

1 change: 0 additions & 1 deletion fragment/.idea/codeStyles/codeStyleConfig.xml

This file was deleted.

1 change: 0 additions & 1 deletion fragment/.idea/copyright/AndroidCopyright.xml

This file was deleted.

1 change: 0 additions & 1 deletion fragment/.idea/copyright/profiles_settings.xml

This file was deleted.

1 change: 0 additions & 1 deletion fragment/.idea/inspectionProfiles/Project_Default.xml

This file was deleted.

1 change: 0 additions & 1 deletion fragment/.idea/scopes/Ignore_API_Files.xml

This file was deleted.

1 change: 0 additions & 1 deletion fragment/.idea/scopes/buildSrc.xml

This file was deleted.

1 change: 0 additions & 1 deletion fragment/gradle

This file was deleted.

1 change: 0 additions & 1 deletion fragment/gradle.properties

This file was deleted.

1 change: 0 additions & 1 deletion fragment/gradlew

This file was deleted.

1 change: 0 additions & 1 deletion fragment/gradlew.bat

This file was deleted.

1 change: 0 additions & 1 deletion lifecycle/.idea/codeStyles/Project.xml

This file was deleted.

1 change: 0 additions & 1 deletion lifecycle/.idea/codeStyles/codeStyleConfig.xml

This file was deleted.

1 change: 0 additions & 1 deletion lifecycle/.idea/copyright/AndroidCopyright.xml

This file was deleted.

1 change: 0 additions & 1 deletion lifecycle/.idea/copyright/profiles_settings.xml

This file was deleted.

1 change: 0 additions & 1 deletion lifecycle/.idea/inspectionProfiles/Project_Default.xml

This file was deleted.

1 change: 0 additions & 1 deletion lifecycle/.idea/scopes/Ignore_API_Files.xml

This file was deleted.

1 change: 0 additions & 1 deletion lifecycle/.idea/scopes/buildSrc.xml

This file was deleted.

1 change: 0 additions & 1 deletion lifecycle/gradle

This file was deleted.

1 change: 0 additions & 1 deletion lifecycle/gradle.properties

This file was deleted.

1 change: 0 additions & 1 deletion lifecycle/gradlew

This file was deleted.

1 change: 0 additions & 1 deletion lifecycle/gradlew.bat

This file was deleted.

1 change: 0 additions & 1 deletion navigation/.idea/codeStyles/Project.xml

This file was deleted.

1 change: 0 additions & 1 deletion navigation/.idea/codeStyles/codeStyleConfig.xml

This file was deleted.

1 change: 0 additions & 1 deletion navigation/.idea/copyright/AndroidCopyright.xml

This file was deleted.

1 change: 0 additions & 1 deletion navigation/.idea/copyright/profiles_settings.xml

This file was deleted.

1 change: 0 additions & 1 deletion navigation/.idea/inspectionProfiles/Project_Default.xml

This file was deleted.

1 change: 0 additions & 1 deletion navigation/.idea/scopes/Ignore_API_Files.xml

This file was deleted.

1 change: 0 additions & 1 deletion navigation/.idea/scopes/buildSrc.xml

This file was deleted.

1 change: 0 additions & 1 deletion navigation/gradle

This file was deleted.

1 change: 0 additions & 1 deletion navigation/gradle.properties

This file was deleted.

1 change: 0 additions & 1 deletion navigation/gradlew

This file was deleted.

1 change: 0 additions & 1 deletion navigation/gradlew.bat

This file was deleted.

1 change: 0 additions & 1 deletion paging/.idea/codeStyles/Project.xml

This file was deleted.

1 change: 0 additions & 1 deletion paging/.idea/codeStyles/codeStyleConfig.xml

This file was deleted.

1 change: 0 additions & 1 deletion paging/.idea/copyright/AndroidCopyright.xml

This file was deleted.

1 change: 0 additions & 1 deletion paging/.idea/copyright/profiles_settings.xml

This file was deleted.

1 change: 0 additions & 1 deletion paging/.idea/inspectionProfiles/Project_Default.xml

This file was deleted.

1 change: 0 additions & 1 deletion paging/.idea/scopes/Ignore_API_Files.xml

This file was deleted.

1 change: 0 additions & 1 deletion paging/.idea/scopes/buildSrc.xml

This file was deleted.

1 change: 0 additions & 1 deletion paging/gradle

This file was deleted.

1 change: 0 additions & 1 deletion paging/gradle.properties

This file was deleted.

1 change: 0 additions & 1 deletion paging/gradlew

This file was deleted.

1 change: 0 additions & 1 deletion paging/gradlew.bat

This file was deleted.

Loading

0 comments on commit 3279445

Please sign in to comment.