Skip to content

Commit 3fc6b39

Browse files
malmsteinCrisBarreiro
authored andcommitted
ADS: Add Theme Preview as internal (#6974)
Task/Issue URL: https://app.asana.com/1/137249556945/project/1202552961248957/task/1211716283511367?focus=true ### Description Adds the ADS preview as an internal feature ### Steps to test this PR _Play Flavour_ - [x] Open the app installing the Play flavour - [x] Navigate to settings - [x] Verify that the ADS Preview feature is not visible _Internal Flavour_ - [x] Open the app installing the Internal flavour - [x] Navigate to settings - [x] Verify that the ADS Preview feature is visible (cherry picked from commit e355592)
1 parent a04ecd5 commit 3fc6b39

File tree

4 files changed

+60
-2
lines changed

4 files changed

+60
-2
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
/*
2+
* Copyright (c) 2025 DuckDuckGo
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
plugins {
18+
id 'com.android.library'
19+
id 'kotlin-android'
20+
id 'com.squareup.anvil'
21+
}
22+
23+
apply from: "$rootProject.projectDir/gradle/android-library.gradle"
24+
25+
android {
26+
anvil {
27+
generateDaggerFactories = true // default is false
28+
}
29+
namespace 'com.duckduckgo.common.ui.internal'
30+
}
31+
32+
dependencies {
33+
34+
implementation "com.squareup.logcat:logcat:_"
35+
36+
implementation project(path: ':common-utils')
37+
implementation project(path: ':design-system')
38+
39+
implementation project(path: ':di')
40+
anvil project(path: ':anvil-compiler')
41+
implementation project(path: ':anvil-annotations')
42+
implementation project(path: ':app-build-config-api')
43+
implementation project(':internal-features-api')
44+
implementation project(path: ':navigation-api')
45+
46+
implementation AndroidX.appCompat
47+
implementation Google.android.material
48+
implementation AndroidX.constraintLayout
49+
implementation AndroidX.core.splashscreen
50+
implementation AndroidX.recyclerView
51+
implementation AndroidX.lifecycle.viewModelKtx
52+
// just to get the dagger annotations
53+
implementation Google.dagger
54+
55+
}

design-system/src/main/java/com/duckduckgo/common/ui/themepreview/ui/AppComponentsSettingsFeature.kt renamed to android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ThemePreviewInternalFeature.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.duckduckgo.common.ui.themepreview.ui
17+
package com.duckduckgo.common.ui.internal
1818

1919
import android.content.Context
2020
import com.duckduckgo.anvil.annotations.PriorityKey
21+
import com.duckduckgo.common.ui.themepreview.ui.AppComponentsActivity
2122
import com.duckduckgo.di.scopes.AppScope
2223
import com.duckduckgo.internal.features.api.InternalFeaturePlugin
2324
import com.squareup.anvil.annotations.ContributesMultibinding
@@ -37,6 +38,6 @@ class ThemesPreviewInternalFeature @Inject constructor(private val context: Cont
3738
}
3839

3940
override fun onInternalFeatureClicked(activityContext: Context) {
40-
activityContext.startActivity(AppComponentsActivity.intent(activityContext))
41+
activityContext.startActivity(AppComponentsActivity.Companion.intent(activityContext))
4142
}
4243
}

app/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ dependencies {
273273
implementation project(':experiments-impl')
274274
implementation project(':common-utils')
275275
implementation project(':app-store')
276+
internalImplementation project(':design-system-internal')
276277
implementation project(':design-system')
277278
implementation project(':di')
278279
implementation project(':app-tracking-api')

0 commit comments

Comments
 (0)