Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change project structure #38

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
13 changes: 7 additions & 6 deletions .github/workflows/android-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ jobs:
submodules: "recursive"
- name: Check if androidTest folder is not empty
run: |
echo "NOT_EMPTY=$([ "$(ls -A BackupApp/src/androidTest)" ] && echo 'true' || echo 'false')"
echo "NOT_EMPTY=$([ "$(ls -A BackupApp/src/androidTest)" ] && echo 'true' || echo 'false')" >> $GITHUB_OUTPUT
echo "NOT_EMPTY=$([ "$(ls -A app/src/androidTest)" ] && echo 'true' || echo 'false')"
echo "NOT_EMPTY=$([ "$(ls -A app/src/androidTest)" ] && echo 'true' || echo 'false')" >> $GITHUB_OUTPUT
id: check-androidTest
- name: Get min and target sdk
if: steps.check-androidTest.outputs.NOT_EMPTY == 'true'
id: get-sdk-version
run: |
echo "MIN_SDK_VERSION=$(cat BackupApp/build.gradle | grep minSdkVersion | rev | cut -d' ' -f 1 | rev)" >> $GITHUB_OUTPUT
echo "TARGET_SDK_VERSION=$(cat BackupApp/build.gradle | grep targetSdkVersion | rev | cut -d' ' -f 1 | rev)" >> $GITHUB_OUTPUT
echo "MIN_SDK_VERSION=$(cat app/build.gradle | grep minSdkVersion | rev | cut -d' ' -f 1 | rev)" >> $GITHUB_OUTPUT
echo "TARGET_SDK_VERSION=$(cat app/build.gradle | grep targetSdkVersion | rev | cut -d' ' -f 1 | rev)" >> $GITHUB_OUTPUT
- name: Get app ID
id: get-app-id
run: |
echo "APP_ID=$(cat BackupApp/build.gradle | grep applicationId | rev | cut -d' ' -f 1 | rev | tr -d '"')" >> $GITHUB_OUTPUT
echo "APP_ID=$(cat app/build.gradle | grep applicationId | rev | cut -d' ' -f 1 | rev | tr -d '"')" >> $GITHUB_OUTPUT

test:
needs: check-if-tests-exist
Expand Down Expand Up @@ -92,7 +92,8 @@ jobs:
adb uninstall ${{needs.check-if-tests-exist.outputs.app-id}} || true
adb uninstall ${{needs.check-if-tests-exist.outputs.app-id}}.test || true
adb uninstall ${{needs.check-if-tests-exist.outputs.app-id}}.androidTest || true
./gradlew :BackupApp:connectedCheck --stacktrace
chmod +x gradlew
./gradlew :app:connectedCheck --stacktrace
adb uninstall ${{needs.check-if-tests-exist.outputs.app-id}} || true
adb uninstall ${{needs.check-if-tests-exist.outputs.app-id}}.test || true
adb uninstall ${{needs.check-if-tests-exist.outputs.app-id}}.androidTest || true
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: lint-results-debug
path: BackupApp/build/reports/lint-results-debug.html
path: app/build/reports/lint-results-debug.html

- name: Build the app
run: bash ./gradlew build --stacktrace
Expand All @@ -64,4 +64,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: debug-apk
path: BackupApp/build/outputs/apk/debug/*.apk
path: app/build/outputs/apk/debug/*.apk
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ Thumbs.db
*.apk
/pfa.properties
/.idea/
/BackupApp/release
/app/release
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[submodule "BackupAPI"]
path = BackupAPI
path = libs/privacy-friendly-backup-api
url = https://github.com/SecUSo/privacy-friendly-backup-api.git
[submodule "openpgp-api"]
path = openpgp-api
path = libs/openpgp-api
url = https://github.com/open-keychain/openpgp-api
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
include ':BackupApp'
include ':app'
rootProject.name = "Backup"

include ':BackupAPI'
project(':BackupAPI').projectDir = new File('BackupAPI/BackupAPI')
project(':BackupAPI').projectDir = new File('libs/privacy-friendly-backup-api/BackupAPI')

include ':openpgp-api'
project(':openpgp-api').projectDir = new File('openpgp-api/openpgp-api')
project(':openpgp-api').projectDir = new File('libs/openpgp-api/openpgp-api')