Skip to content

Commit

Permalink
Move internal features out of app module (#3362)
Browse files Browse the repository at this point in the history
Task/Issue URL: https://app.asana.com/0/488551667048375/1205077183964550/f

### Description
Move the internal features out of `:app` module

Had to create a `:common-ui-internal` module to move the `ThemesPreviewInternalFeature` in there and incidentally re-org'ed the `common` modules

### Steps to test this PR
smoke test internal features.
verify internal features don't appear in play build
  • Loading branch information
aitorvs authored Jul 21, 2023
1 parent 04b00f6 commit 1a245fc
Show file tree
Hide file tree
Showing 442 changed files with 201 additions and 78 deletions.
2 changes: 1 addition & 1 deletion ad-click/ad-click-impl/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ dependencies {
implementation project(path: ':anvil-annotations')
implementation project(path: ':ad-click-api')
implementation project(path: ':di')
implementation project(path: ':common')
implementation project(path: ':common-utils')
implementation project(path: ':statistics')
implementation project(path: ':privacy-config-api')
implementation project(path: ':feature-toggles-api')
Expand Down
2 changes: 1 addition & 1 deletion ad-click/ad-click-store/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ plugins {
apply from: "$rootProject.projectDir/gradle/android-library.gradle"

dependencies {
implementation project(path: ':common')
implementation project(path: ':common-utils')
implementation project(path: ':ad-click-api')
implementation Kotlin.stdlib.jdk7
implementation AndroidX.core.ktx
Expand Down
2 changes: 1 addition & 1 deletion anrs/anrs-impl/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ dependencies {
implementation project(':app-build-config-api')
implementation project(':anrs-api')
implementation project(':anrs-store')
implementation project(':common')
implementation project(':common-utils')
implementation project(':di')
implementation project(':browser-api')
implementation project(':statistics')
Expand Down
2 changes: 1 addition & 1 deletion anrs/anrs-store/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ plugins {
apply from: "$rootProject.projectDir/gradle/android-library.gradle"

dependencies {
implementation project(path: ':common')
implementation project(path: ':common-utils')

implementation Kotlin.stdlib.jdk7
implementation AndroidX.core.ktx
Expand Down
2 changes: 1 addition & 1 deletion app-tracking-protection/vpn-impl/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ dependencies {
implementation project(path: ':app-store')
implementation project(path: ':browser-api')
implementation project(path: ':di')
implementation project(path: ':common')
implementation project(path: ':common-utils')
implementation project(path: ':common-ui')
implementation project(path: ':statistics')
implementation project(path: ':app-build-config-api')
Expand Down
25 changes: 13 additions & 12 deletions app-tracking-protection/vpn-internal/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,19 @@ android {
}

dependencies {
anvil project(path: ':anvil-compiler')
implementation project(path: ':anvil-annotations')

implementation project(path: ':vpn-impl')
implementation project(path: ':vpn-store')
implementation project(path: ':vpn-api')
implementation project(path: ':app-tracking-api')
implementation project(path: ':di')
implementation project(path: ':common')
implementation project(path: ':common-ui')
implementation project(path: ':app-build-config-api')
implementation project(path: ':feature-toggles-api')
anvil project(':anvil-compiler')
implementation project(':anvil-annotations')

implementation project(':vpn-impl')
implementation project(':vpn-store')
implementation project(':vpn-api')
implementation project(':app-tracking-api')
implementation project(':di')
implementation project(':common-utils')
implementation project(':common-ui')
implementation project(':app-build-config-api')
implementation project(':feature-toggles-api')
implementation project(':internal-features-api')
implementation project(':navigation-api')

implementation Kotlin.stdlib.jdk7
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 DuckDuckGo
* Copyright (c) 2023 DuckDuckGo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -14,13 +14,12 @@
* limitations under the License.
*/

package com.duckduckgo.app.feature
package com.duckduckgo.vpn.internal.feature

import android.content.Context
import com.duckduckgo.di.scopes.AppScope
import com.duckduckgo.internal.features.api.InternalFeaturePlugin
import com.duckduckgo.navigation.api.GlobalActivityStarter
import com.duckduckgo.vpn.internal.feature.LaunchVpnInternalScreenWithEmptyParams
import com.squareup.anvil.annotations.ContributesMultibinding
import javax.inject.Inject

Expand Down
2 changes: 1 addition & 1 deletion app-tracking-protection/vpn-store/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ android {

dependencies {

implementation project(path: ':common')
implementation project(path: ':common-utils')
implementation project(path: ':vpn-api')
implementation project(path: ':feature-toggles-api')
implementation project(path: ':app-build-config-api')
Expand Down
4 changes: 3 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,10 @@ dependencies {
implementation project(':app-build-config-api')
implementation project(':browser-api')
implementation project(':statistics')
implementation project(':common')
implementation project(':common-utils')
implementation project(':app-store')
implementation project(':common-ui')
internalImplementation project(':common-ui-internal')
implementation project(':di')
implementation project(':app-tracking-api')
implementation project(':vpn-impl')
Expand Down Expand Up @@ -261,6 +262,7 @@ dependencies {

implementation project(':sync-api')
implementation project(':sync-impl')
implementation project(':sync-internal')
implementation project(':sync-store')
implementation project(':sync-lib')

Expand Down
4 changes: 0 additions & 4 deletions app/src/internal/res/values/donottranslate.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,4 @@
<string name="surrogatesSubtitle">Main frame and iFrame should be green.</string>
<string name="surrogatesDisabledTitle">Surrogates Disabled</string>
<string name="surrogatesDisabledSubtitle">Main frame and iFrame should be red.</string>

<!-- sync dev settings -->
<string name="syncSettingsTitle">Sync Dev Settings</string>
<string name="syncSettingsSubtitle">Sync Dev Internal Test</string>
</resources>
2 changes: 1 addition & 1 deletion autoconsent/autoconsent-impl/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ dependencies {
implementation project(path: ':anvil-annotations')

implementation project(path: ':di')
implementation project(path: ':common')
implementation project(path: ':common-utils')
implementation project(path: ':common-ui')
implementation project(path: ':privacy-config-api')
implementation project(path: ':feature-toggles-api')
Expand Down
2 changes: 1 addition & 1 deletion autoconsent/autoconsent-store/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ apply from: "$rootProject.projectDir/gradle/android-library.gradle"

dependencies {
implementation project(path: ':autoconsent-api')
implementation project(path: ':common')
implementation project(path: ':common-utils')

implementation AndroidX.core.ktx
implementation KotlinX.coroutines.core
Expand Down
2 changes: 1 addition & 1 deletion autofill/autofill-impl/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ dependencies {
implementation project(path: ':privacy-config-api')
implementation project(path: ':feature-toggles-api')
implementation project(path: ':di')
implementation project(path: ':common')
implementation project(path: ':common-utils')
implementation project(path: ':common-ui')
implementation project(path: ':autofill-api')
implementation project(path: ':secure-storage-api')
Expand Down
2 changes: 1 addition & 1 deletion autofill/autofill-store/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {
apply from: "$rootProject.projectDir/gradle/android-library.gradle"

dependencies {
implementation project(path: ':common')
implementation project(path: ':common-utils')
implementation project(path: ':autofill-api')
implementation project(path: ':secure-storage-api')
implementation project(path: ':privacy-config-api')
Expand Down
2 changes: 1 addition & 1 deletion browser-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ apply from: "$rootProject.projectDir/gradle/android-library.gradle"
dependencies {
implementation project(path: ':navigation-api')
implementation project(path: ':common-ui')
implementation project(path: ':common')
implementation project(path: ':common-utils')
implementation Kotlin.stdlib.jdk7
implementation AndroidX.core.ktx
implementation KotlinX.coroutines.core
Expand Down
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ subprojects {
if (projectPath.endsWith(':vpn-internal') && dependencyPath.endsWith(':vpn-impl')) continue
// network-protection-internal is part of network-protection-impl
if (projectPath.endsWith(':network-protection-internal') && dependencyPath.endsWith(':network-protection-impl')) continue
// sync-internal is part of sync-impl
if (projectPath.endsWith(':sync-internal') && dependencyPath.endsWith(':sync-impl')) continue
if (!projectPath.endsWith(":app") && dependencyPath.endsWith("impl")) {
throw new GradleException("Invalid dependency $projectPath -> $dependencyPath. " +
"Only :app module can depend on 'impl' modules")
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ apply from: "$rootProject.projectDir/gradle/android-library.gradle"
dependencies {

// Dependencies for this Module
implementation project(path: ':common')
implementation project(path: ':common-utils')

implementation "io.reactivex.rxjava2:rxjava:_"
implementation "io.reactivex.rxjava2:rxandroid:_"
Expand Down
File renamed without changes.
File renamed without changes.
43 changes: 43 additions & 0 deletions common/common-ui-internal/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* Copyright (c) 2021 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.
*/

plugins {
id 'com.android.library'
id 'kotlin-android'
id 'com.squareup.anvil'
}

apply from: "$rootProject.projectDir/gradle/android-library.gradle"

android {
anvil {
generateDaggerFactories = true // default is false
}
namespace 'com.duckduckgo.common.ui.internal'
}

dependencies {
implementation project(':common-ui')
implementation project(':di')
implementation project(':internal-features-api')

implementation Kotlin.stdlib.jdk7

// Dagger
implementation Google.dagger

implementation "com.squareup.logcat:logcat:_"
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package com.duckduckgo.app.feature
package com.duckduckgo.common.ui.internal

import android.content.Context
import com.duckduckgo.di.scopes.AppScope
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion common-ui/build.gradle → common/common-ui/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ android {

dependencies {

implementation project(path: ':common')
implementation project(path: ':common-utils')
implementation project(path: ':di')
anvil project(path: ':anvil-compiler')
implementation project(path: ':anvil-annotations')
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 1a245fc

Please sign in to comment.