diff --git a/app/build.gradle b/app/build.gradle
index 7e2290627..8a16fe8a3 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -53,6 +53,16 @@ android {
main.java.srcDirs += 'src/main/kotlin'
}
+ flavorDimensions "licensing"
+ productFlavors {
+ proprietary { }
+ foss {
+ // We're not using PhotoEditor here, so changing the name is fine.
+ applicationIdSuffix ".foss"
+ versionNameSuffix "-foss"
+ }
+ }
+
lintOptions {
checkReleaseBuilds false
abortOnError false
@@ -92,28 +102,30 @@ dependencies {
}
// Apply the PESDKPlugin
-apply plugin: 'ly.img.android.sdk'
+if (is_proprietary) {
+ apply plugin: 'ly.img.android.sdk'
-imglyConfig {
- pesdk {
- enabled true
- licencePath 'pesdk_license'
- }
+ imglyConfig {
+ pesdk {
+ enabled true
+ licencePath 'pesdk_license'
+ }
- supportLibVersion "28.0.0"
+ supportLibVersion "28.0.0"
- modules {
- include 'ui:core'
- include 'ui:text'
- include 'ui:focus'
- include 'ui:brush'
- include 'ui:filter'
- include 'ui:transform'
- include 'ui:adjustment'
+ modules {
+ include 'ui:core'
+ include 'ui:text'
+ include 'ui:focus'
+ include 'ui:brush'
+ include 'ui:filter'
+ include 'ui:transform'
+ include 'ui:adjustment'
- include 'backend:serializer'
+ include 'backend:serializer'
- include 'assets:font-basic'
- include 'assets:filter-basic'
+ include 'assets:font-basic'
+ include 'assets:filter-basic'
+ }
}
}
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 11b2f5c91..307682ab0 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -201,20 +201,18 @@
-
+
+
+
-
-
-
diff --git a/app/src/proprietary/AndroidManifest.xml b/app/src/proprietary/AndroidManifest.xml
new file mode 100644
index 000000000..3e08b8072
--- /dev/null
+++ b/app/src/proprietary/AndroidManifest.xml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/assets/pesdk_license b/app/src/proprietary/assets/pesdk_license
similarity index 100%
rename from app/src/main/assets/pesdk_license
rename to app/src/proprietary/assets/pesdk_license
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/NewEditActivity.kt b/app/src/proprietary/kotlin/com/simplemobiletools/gallery/pro/activities/NewEditActivity.kt
similarity index 100%
rename from app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/NewEditActivity.kt
rename to app/src/proprietary/kotlin/com/simplemobiletools/gallery/pro/activities/NewEditActivity.kt
diff --git a/build.gradle b/build.gradle
index 846e1e568..a51e459b5 100644
--- a/build.gradle
+++ b/build.gradle
@@ -2,17 +2,22 @@
buildscript {
ext.kotlin_version = '1.3.61'
+ ext.is_proprietary = gradle.startParameter.taskNames.any { task -> task.contains("Proprietary") }
repositories {
google()
jcenter()
- maven { url 'https://artifactory.img.ly/artifactory/imgly' }
+ if (is_proprietary) {
+ maven { url 'https://artifactory.img.ly/artifactory/imgly' }
+ }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
- classpath 'ly.img.android.pesdk:plugin:7.0.10'
+ if (is_proprietary) {
+ classpath 'ly.img.android.pesdk:plugin:7.0.10'
+ }
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files