@@ -27,23 +27,77 @@ plugins {
2727
2828### Option 2: Local Development
2929
30- To test locally without publishing:
30+ If the plugin is not yet published to the Gradle Plugin Portal, you can use Maven Local.
3131
32- ``` groovy
33- // In build.gradle (project level)
34- buildscript {
32+ ** Step 1: Build and publish the plugin locally**
33+
34+ ``` bash
35+ # Clone the repository
36+ git clone https://github.com/davideagostini/android-build-analyzer.git
37+ cd android-build-analyzer
38+
39+ # Build and publish to Maven Local
40+ ./gradlew clean publishToMavenLocal
41+ ```
42+
43+ ** Step 2: Add the plugin to your Android project**
44+
45+ In your Android project's ` settings.gradle.kts ` :
46+
47+ ``` kotlin
48+ pluginManagement {
3549 repositories {
3650 mavenLocal()
51+ gradlePluginPortal()
3752 }
38- dependencies {
39- classpath 'com.davideagostini:android-build-analyzer:1.0.0'
53+ }
54+
55+ plugins {
56+ id(" com.davideagostini.analyzer" ) version " 1.0.0"
57+ }
58+ ```
59+
60+ Or if using Groovy ` build.gradle ` :
61+
62+ ``` groovy
63+ // In settings.gradle
64+ pluginManagement {
65+ repositories {
66+ mavenLocal()
67+ gradlePluginPortal()
4068 }
4169}
4270
43- // In build.gradle (app level)
44- apply plugin: 'com.davideagostini.analyzer'
71+ plugins {
72+ id 'com.davideagostini.analyzer' version '1.0.0'
73+ }
74+ ```
75+
76+ ** Step 3: Configure the plugin**
77+
78+ Add the configuration block to your ` app/build.gradle ` :
79+
80+ ``` kotlin
81+ androidBuildAnalyzer {
82+ enabled = true
83+ checkDebuggable = true
84+ checkMinifyEnabled = true
85+ checkAllowBackup = true
86+ reportPath = " build/reports/analyzer"
87+ failOnCriticalIssues = false
88+ }
89+ ```
90+
91+ ** Step 4: Run the analysis**
92+
93+ ``` bash
94+ ./gradlew analyze
4595```
4696
97+ The HTML report will be generated at ` app/build/reports/analyzer/report.html ` .
98+
99+ ** Note:** When using Maven Local, the plugin version must match the version in the plugin's ` build.gradle.kts ` (` version = "1.0.0" ` ).
100+
47101## Configuration
48102
49103The plugin provides configurable options via the ` androidBuildAnalyzer ` extension:
0 commit comments