PatilShreyas / bytemask

Android Gradle Plugin that masks secret strings for the app in the source code making it difficult to extract from reverse engineering.
https://patilshreyas.github.io/bytemask/
Apache License 2.0
243 stars 8 forks source link

Incompatible with `applicationIdSuffix` #8

Closed matejsemancik closed 4 months ago

matejsemancik commented 5 months ago

The generated classes have package resolved from applicationId + applicationIdSuffix which breaks compatibility between different build variants.

For example:

// app module build.gradle.kts

android {
  namespace = "com.example.app.android"

  defaultConfig {
    applicationId = "com.example.app"
  }

  buildTypes {
    debug {
      applicationIdSuffix = ".debug"
    }
    release {
      applicationIdSuffix = ".release"
    }
  }
}

bytemaskConfig {
  className.set("BytemaskConfig")
}

This breaks binary compatibility between build variants and project will not compile after switching between build types.

I think the solution would be either to:

PatilShreyas commented 5 months ago

Thanks for raising this issue and helping to make it better.

PatilShreyas commented 5 months ago

We'll plan it for upcoming alpha version: 1.0.0-alpha02