Skip to content
This repository was archived by the owner on Feb 27, 2025. It is now read-only.

Commit d1f126d

Browse files
authored
Merge pull request #1 from readdle/feature/restore-flavors
Restore flavors
2 parents 1940671 + 2c9ff8c commit d1f126d

File tree

4 files changed

+23
-163
lines changed

4 files changed

+23
-163
lines changed

todoapp/app/build.gradle

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,27 @@ android {
4949
}
5050
}
5151

52+
flavorDimensions "default"
53+
54+
// If you need to add more flavors, consider using flavor dimensions.
55+
productFlavors {
56+
mock {
57+
dimension "default"
58+
applicationIdSuffix = ".mock"
59+
}
60+
prod {
61+
dimension "default"
62+
}
63+
}
64+
65+
// Remove mockRelease as it's not needed.
66+
android.variantFilter { variant ->
67+
if (variant.buildType.name == 'release'
68+
&& variant.getFlavors().get(0).name == 'mock') {
69+
variant.setIgnore(true)
70+
}
71+
}
72+
5273
dataBinding {
5374
enabled = true
5475
}

todoapp/app/src/main/java/com/example/android/architecture/blueprints/todoapp/data/FakeTasksRemoteDataSource.java

Lines changed: 0 additions & 122 deletions
This file was deleted.

todoapp/app/src/mock/java/com/example/android/architecture/blueprints/todoapp/Injection.java

Lines changed: 0 additions & 40 deletions
This file was deleted.

todoapp/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@ buildscript {
22
repositories {
33
jcenter()
44
google()
5+
mavenLocal()
56
maven { url "https://dl.bintray.com/readdle/maven" }
67
}
78
dependencies {
89
classpath 'com.android.tools.build:gradle:3.5.1'
9-
classpath 'com.readdle.android.swift:gradle:1.3.2'
10+
classpath 'com.readdle.android.swift:gradle:1.3.3'
1011
// NOTE: Do not place your application dependencies here; they belong
1112
// in the individual module build.gradle files
1213
}

0 commit comments

Comments
 (0)