Skip to content

Commit

Permalink
app: gradle: define SEP Lite flavour
Browse files Browse the repository at this point in the history
Let's keep using "com.samsung.device" library to prevent the app from being installed on non Samsung OSs, attempts to use other system shared libraries failed.

Signed-off-by: BlackMesa123 <[email protected]>
  • Loading branch information
salvogiangri committed Feb 20, 2023
1 parent ab3355f commit d350afe
Show file tree
Hide file tree
Showing 4 changed files with 152 additions and 4 deletions.
20 changes: 20 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,26 @@ android {
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
}

flavorDimensions += "sepCategory"

productFlavors {
create("sepBasic") {
dimension = "sepCategory"
}
create("sepLite") {
dimension = "sepCategory"
}
}

sourceSets {
named("sepBasic") {
manifest.srcFile("config/AndroidManifest_SEPBasic.xml")
}
named("sepLite") {
manifest.srcFile("config/AndroidManifest_SEPLite.xml")
}
}
}

configurations.all {
Expand Down
66 changes: 66 additions & 0 deletions app/config/AndroidManifest_SEPBasic.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application
android:allowBackup="false"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/Theme.KnoxPatch">

<uses-library
android:name="com.samsung.device"
android:required="true" />

<!-- SamsungBasicInteraction -->
<meta-data
android:name="SamsungBasicInteraction"
android:value="SEP10" />

<!-- Samsung Color Theme -->
<meta-data
android:name="theming-meta"
android:value="sep_color_theme_meta" />
<meta-data
android:name="theming-meta-xml"
android:value="@xml/sep_color_theme_meta"/>

<!-- Xposed -->
<meta-data
android:name="xposedmodule"
android:value="true" />
<meta-data
android:name="xposeddescription"
android:value="@string/module_description" />
<meta-data
android:name="xposedminversion"
android:value="93" />
<meta-data
android:name="xposedscope"
android:resource="@array/scope" />

<activity
android:name=".ui.activity.InfoActivity"
android:launchMode="singleTask"
android:exported="true">

<!-- Samsung Icon Color Theme -->
<meta-data
android:name="com.sec.android.app.launcher.icon_theme"
android:value="themeColor" />

<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="de.robv.android.xposed.category.MODULE_SETTINGS" />
</intent-filter>

<intent-filter>
<action android:name="com.sec.android.intent.action.SEC_APPLICATION_SETTINGS"/>
<category android:name="com.sec.android.intent.category.SEC_APPLICATION_SETTINGS"/>
</intent-filter>

</activity>

</application>

</manifest>
66 changes: 66 additions & 0 deletions app/config/AndroidManifest_SEPLite.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application
android:allowBackup="false"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/Theme.KnoxPatch">

<uses-library
android:name="com.samsung.device.lite"
android:required="true" />

<!-- SamsungBasicInteraction -->
<meta-data
android:name="SamsungBasicInteraction"
android:value="SEP10" />

<!-- Samsung Color Theme -->
<meta-data
android:name="theming-meta"
android:value="sep_color_theme_meta" />
<meta-data
android:name="theming-meta-xml"
android:value="@xml/sep_color_theme_meta"/>

<!-- Xposed -->
<meta-data
android:name="xposedmodule"
android:value="true" />
<meta-data
android:name="xposeddescription"
android:value="@string/module_description" />
<meta-data
android:name="xposedminversion"
android:value="93" />
<meta-data
android:name="xposedscope"
android:resource="@array/scope" />

<activity
android:name=".ui.activity.InfoActivity"
android:launchMode="singleTask"
android:exported="true">

<!-- Samsung Icon Color Theme -->
<meta-data
android:name="com.sec.android.app.launcher.icon_theme"
android:value="themeColor" />

<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="de.robv.android.xposed.category.MODULE_SETTINGS" />
</intent-filter>

<intent-filter>
<action android:name="com.sec.android.intent.action.SEC_APPLICATION_SETTINGS"/>
<category android:name="com.sec.android.intent.category.SEC_APPLICATION_SETTINGS"/>
</intent-filter>

</activity>

</application>

</manifest>
4 changes: 0 additions & 4 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
android:supportsRtl="true"
android:theme="@style/Theme.KnoxPatch">

<uses-library
android:name="com.samsung.device"
android:required="true" />

<!-- SamsungBasicInteraction -->
<meta-data
android:name="SamsungBasicInteraction"
Expand Down

0 comments on commit d350afe

Please sign in to comment.