diff --git a/settings/settings-api/build.gradle b/settings/settings-api/build.gradle index 806b9cdd3d98..65619c220529 100644 --- a/settings/settings-api/build.gradle +++ b/settings/settings-api/build.gradle @@ -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 diff --git a/settings/settings-api/src/main/java/com/duckduckgo/settings/api/NewSettingsFeature.kt b/settings/settings-api/src/main/java/com/duckduckgo/settings/api/NewSettingsFeature.kt new file mode 100644 index 000000000000..d1b307144eea --- /dev/null +++ b/settings/settings-api/src/main/java/com/duckduckgo/settings/api/NewSettingsFeature.kt @@ -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 +} diff --git a/app/src/main/java/com/duckduckgo/app/settings/NewSettingsFeature.kt b/settings/settings-impl/src/main/java/com/duckduckgo/settings/impl/NewSettingsTrigger.kt similarity index 81% rename from app/src/main/java/com/duckduckgo/app/settings/NewSettingsFeature.kt rename to settings/settings-impl/src/main/java/com/duckduckgo/settings/impl/NewSettingsTrigger.kt index 88f041a28061..86f4cd479db0 100644 --- a/app/src/main/java/com/duckduckgo/app/settings/NewSettingsFeature.kt +++ b/settings/settings-impl/src/main/java/com/duckduckgo/settings/impl/NewSettingsTrigger.kt @@ -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