Skip to content

Commit

Permalink
TASK: MultiApp - refactor source code to allow multiapp
Browse files Browse the repository at this point in the history
  • Loading branch information
jarroyoesp committed Jun 23, 2023
1 parent e1d055a commit 7c45e89
Show file tree
Hide file tree
Showing 80 changed files with 66 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: build-outputs
path: app/build/outputs
path: apps/forlago/build/outputs
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ jobs:
# uses: actions/upload-artifact@v3
# with:
# name: ruler
# path: app/build/reports/ruler
# path: apps/forlago/build/reports/ruler

build-debug:
name: Build debug
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/mobsf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: build-outputs
path: app/build/outputs
path: apps/forlago/build/outputs

- run: |
sudo mkdir -p /home/runner/work/_temp/_github_home
Expand All @@ -67,7 +67,7 @@ jobs:
- name: Run MobSF Analysis
uses: fundacaocerti/mobsf-action@96f53daa4d68a2caaeb5caf23ded96a10ebaf87b #v1.7.1
env:
INPUT_FILE_NAME: app/build/outputs/apk/release/forlago-release.apk
INPUT_FILE_NAME: apps/forlago/build/outputs/apk/release/forlago-release.apk
SCAN_TYPE: apk
OUTPUT_FILE_NAME: mobsf-report

Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: build-outputs
path: app/build/outputs
path: apps/forlago/build/outputs

- name: Create GitHub release
uses: softprops/action-gh-release@v1
Expand All @@ -112,11 +112,11 @@ jobs:
tag_name: ${{ github.event.inputs.semver }}
fail_on_unmatched_files: true
files: |
app/build/outputs/apk/debug/forlago-debug.apk
app/build/outputs/apk/release/forlago-release.apk
app/build/outputs/bundle/debug/forlago-debug.aab
app/build/outputs/bundle/release/forlago-release.aab
app/build/outputs/mapping/release/mapping.txt
apps/forlago/build/outputs/apk/debug/forlago-debug.apk
apps/forlago/build/outputs/apk/release/forlago-release.apk
apps/forlago/build/outputs/bundle/debug/forlago-debug.aab
apps/forlago/build/outputs/bundle/release/forlago-release.aab
apps/forlago/build/outputs/mapping/release/mapping.txt
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Baseline Profiles improve code execution speed from the first launch by avoiding
Just run this command, and it will generate baseline-profile.txt to add to the project:

```bash
./gradlew :macrobenchmark:pixel6Api31BenchmarkAndroidTest -Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=BaselineProfile -Dorg.gradle.workers.max=4
./gradlew :macrobenchmark:forlago:pixel6Api31BenchmarkAndroidTest -Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=BaselineProfile -Dorg.gradle.workers.max=4
```

The baseline profile generated will be at this path:
Expand All @@ -125,7 +125,7 @@ macrobenchmark/build/outputs/managed_device_android_test_additional_output/pixel

And you have to rename and move it to:
```
app/src/main/baselineProfiles/baseline-prof.txt
apps/forlago/src/main/baselineProfiles/baseline-prof.txt
```

## Contributing 🤝
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

------------------------------------------------------------
Project ':app'
Project ':apps:forlago'
------------------------------------------------------------

benchmarkRuntimeClasspath - Runtime classpath of /benchmark.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

------------------------------------------------------------
Project ':app'
Project ':apps:forlago'
------------------------------------------------------------

benchmarkUnitTestRuntimeClasspath - Runtime classpath of /benchmarkUnitTest.
+--- project :app (*)
+--- project :apps:forlago (*)
+--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.8.21
| +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.21
| | +--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.21
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

------------------------------------------------------------
Project ':app'
Project ':apps:forlago'
------------------------------------------------------------

debugAndroidTestRuntimeClasspath - Runtime classpath of /debugAndroidTest.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

------------------------------------------------------------
Project ':app'
Project ':apps:forlago'
------------------------------------------------------------

debugRuntimeClasspath - Runtime classpath of /debug.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

------------------------------------------------------------
Project ':app'
Project ':apps:forlago'
------------------------------------------------------------

debugUnitTestRuntimeClasspath - Runtime classpath of /debugUnitTest.
+--- project :app (*)
+--- project :apps:forlago (*)
+--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.8.21
| +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.21
| | +--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.21
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

------------------------------------------------------------
Project ':app'
Project ':apps:forlago'
------------------------------------------------------------

releaseRuntimeClasspath - Runtime classpath of /release.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

------------------------------------------------------------
Project ':app'
Project ':apps:forlago'
------------------------------------------------------------

releaseUnitTestRuntimeClasspath - Runtime classpath of /releaseUnitTest.
+--- project :app (*)
+--- project :apps:forlago (*)
+--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.8.21
| +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.21
| | +--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.21
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ plugins {
}
val libs = the<LibrariesForLibs>()

val applyGsmServicesPlugins = rootProject.file("app/google-services.json").exists()
val applyGsmServicesPlugins = rootProject.file("apps/forlago/google-services.json").exists()
if (applyGsmServicesPlugins) {
project.plugins.apply("com.google.gms.google-services")
project.plugins.apply("com.google.firebase.crashlytics")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@ spotless {

tasks {
withType<SpotlessTask> {
mustRunAfter(":app:copyMergedManifests")
mustRunAfter(":apps:forlago:copyMergedManifests")
}
}
2 changes: 1 addition & 1 deletion config/diktat/diktat-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
enabled: true
configuration:
# put your package name here - it will be autofixed and checked
domainName: com.leinardi.forlago
domainName: com.leinardi
# testDirs: test
# can also use chapter names here (not only numbers)
# expected values: disabledChapters: "Naming, Comments, General, Variables, Functions, Classes"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ android {
}
}

targetProjectPath = ":app"
targetProjectPath = ":apps:forlago"
experimentalProperties["android.experimental.self-instrumenting"] = true

buildTypes {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,4 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->

<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<queries>
<package android:name="com.leinardi.forlago.debug" />
</queries>
</manifest>
<manifest />
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* Copyright 2023 Roberto Leinardi.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.leinardi.forlago

import org.junit.Test

import org.junit.Assert.assertEquals

/**
* Example local unit test, which will execute on the development machine (host).
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
class ExampleUnitTest {
@Test
fun addition_isCorrect() {
assertEquals(4, 2 + 2)
}
}
2 changes: 1 addition & 1 deletion release/clean-secrets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ rm -f release/app-release.jks
# Delete Play Store key
rm -f release/play-account.json

rm -f app/google-services.json
rm -f apps/forlago/google-services.json
2 changes: 1 addition & 1 deletion release/decrypt-secrets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if [[ ! -z "$ENCRYPT_KEY" ]]; then
# Decrypt Play Store key
decrypt ${ENCRYPT_KEY} release/play-account.gpg release/play-account.json
# Decrypt Google Services key
decrypt ${ENCRYPT_KEY} release/google-services.gpg app/google-services.json
decrypt ${ENCRYPT_KEY} release/google-services.gpg apps/forlago/google-services.json
else
echo "ENCRYPT_KEY is empty"
fi
4 changes: 2 additions & 2 deletions release/encrypt-secrets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ encrypt() {

if [[ ! -z "$ENCRYPT_KEY" ]]; then
# Encrypt Release key
encrypt ${ENCRYPT_KEY} release/app-release.jks release/app-release.gpg
encrypt ${ENCRYPT_KEY} release/app-release.jks release/app-release.gpg
# Encrypt Play Store key
encrypt ${ENCRYPT_KEY} release/play-account.json release/play-account.gpg
# Encrypt Google Services key
encrypt ${ENCRYPT_KEY} app/google-services.json release/google-services.gpg
encrypt ${ENCRYPT_KEY} apps/forlago/google-services.json release/google-services.gpg
else
echo "ENCRYPT_KEY is empty"
fi
4 changes: 2 additions & 2 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ includeBuild("build-conventions")
include(

// Apps
":app",
":apps:forlago",

// Baseline profiles
":macrobenchmark",
":macrobenchmark:forlago",

// Modules
":modules:feature-account",
Expand Down

0 comments on commit 7c45e89

Please sign in to comment.