Skip to content

Commit

Permalink
add feature toggle to settings-api
Browse files Browse the repository at this point in the history
  • Loading branch information
mikescamell committed Nov 25, 2024
1 parent e9c68ed commit 1f4714c
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 7 deletions.
3 changes: 3 additions & 0 deletions settings/settings-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ plugins {
apply from: "$rootProject.projectDir/gradle/android-library.gradle"

dependencies {
/* Temporary while developing new settings screen */
implementation project(':feature-toggles-api')

implementation project(':navigation-api')
implementation Google.dagger
implementation AndroidX.core.ktx
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Copyright (c) 2024 DuckDuckGo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.duckduckgo.settings.api

import com.duckduckgo.feature.toggles.api.Toggle

interface NewSettingsFeature {

@Toggle.DefaultValue(true)
fun self(): Toggle
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,15 @@
* limitations under the License.
*/

package com.duckduckgo.app.settings
package com.duckduckgo.settings.impl

import com.duckduckgo.anvil.annotations.ContributesRemoteFeature
import com.duckduckgo.di.scopes.AppScope
import com.duckduckgo.feature.toggles.api.Toggle
import com.duckduckgo.settings.api.NewSettingsFeature

@ContributesRemoteFeature(
scope = AppScope::class,
featureName = "newSettings",
boundType = NewSettingsFeature::class,
)
interface NewSettingsFeature {

@Toggle.DefaultValue(false)
fun self(): Toggle
}
private interface NewSettingsCodeGenTrigger

0 comments on commit 1f4714c

Please sign in to comment.