Skip to content
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
3 changes: 3 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ jobs:
- name: Check dependencyGuard
run: ./gradlew dependencyGuard

- name: Check manifestShield
run: ./gradlew manifestShield

- name: Check spotless
run: ./gradlew spotlessCheck --init-script gradle/init.gradle.kts --stacktrace

Expand Down
10 changes: 10 additions & 0 deletions CHECK.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
./gradlew dependencyGuard
```

- manifestShield
```bash
./gradlew manifestShield
```

- spotless
```bash
./gradlew spotlessCheck --init-script gradle/init.gradle.kts
Expand All @@ -30,6 +35,11 @@
./gradlew dependencyGuardBaseline
```

- manifestShield
```bash
./gradlew manifestShieldBaseline
```

- spotless
```bash
./gradlew spotlessApply --init-script gradle/init.gradle.kts
Expand Down
5 changes: 5 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ plugins {
id "moop.android.hilt"
id "org.jetbrains.kotlin.plugin.serialization"
alias libs.plugins.dependencyGuard
alias libs.plugins.manifestShield
alias(libs.plugins.baselineprofile)
}

Expand Down Expand Up @@ -136,6 +137,10 @@ dependencyGuard {
configuration("releaseRuntimeClasspath")
}

manifestShield {
configuration("release")
}

task applyDependencyBaseline {
dependsOn "dependencyGuardBaseline"
}
11 changes: 11 additions & 0 deletions app/manifestShield/releaseAndroidManifest.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
uses-permission:
android.permission.ACCESS_NETWORK_STATE
android.permission.FOREGROUND_SERVICE
android.permission.INTERNET
android.permission.POST_NOTIFICATIONS
android.permission.RECEIVE_BOOT_COMPLETED
android.permission.WAKE_LOCK
soup.movie.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION

activity:
soup.movie.ui.main.MainActivity (exported)
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ plugins {
alias(libs.plugins.dagger.hilt) apply false
alias(libs.plugins.ksp) apply false
alias(libs.plugins.dependencyGuard) apply false
alias(libs.plugins.manifestShield) apply false
alias(libs.plugins.baselineprofile) apply false
}

Expand Down
14 changes: 10 additions & 4 deletions check.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# Check script for PR submission
# Validates dependencies, code formatting, lint.
# Validates dependencies, merged manifest, code formatting, lint.

# Exit immediately if any command fails
set -e
Expand All @@ -9,19 +9,25 @@ echo "Starting check validations..."
echo ""

# Verify dependency changes
echo "🔍 [1/3] Checking dependency guard..."
echo "🔍 [1/4] Checking dependency guard..."
./gradlew dependencyGuard
echo "✓ Dependency guard check passed"
echo ""

# Verify merged manifest changes
echo "🔍 [2/4] Checking manifest shield..."
./gradlew manifestShield
echo "✓ Manifest shield check passed"
echo ""

# Verify code formatting
echo "🔍 [2/3] Checking code formatting..."
echo "🔍 [3/4] Checking code formatting..."
./gradlew spotlessCheck --init-script gradle/init.gradle.kts
echo "✓ Code formatting check passed"
echo ""

# Static analysis and lint checks
echo "🔍 [3/3] Running lint checks..."
echo "🔍 [4/4] Running lint checks..."
./gradlew lintDebug
echo "✓ Lint check passed"
echo ""
Expand Down
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ photo-compose = "1.0.1"
# Etc
coil = "3.3.0"
dependencyGuard = "0.5.0"
manifestShield = "0.1.10"
retrofit = "3.0.0"
timber = "5.0.1"

Expand Down Expand Up @@ -149,4 +150,5 @@ kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", versi
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
dependencyGuard = { id = "com.dropbox.dependency-guard", version.ref = "dependencyGuard" }
manifestShield = { id = "io.github.fornewid.manifest-shield", version.ref = "manifestShield" }
baselineprofile = { id = "androidx.baselineprofile", version.ref = "androidx-benchmark" }
Loading