-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8153 from wmontwe/add-billing-module-for-tb-daily
Add basic feature setup for funding and Google Play billing support
- Loading branch information
Showing
14 changed files
with
89 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
plugins { | ||
id(ThunderbirdPlugins.Library.jvm) | ||
alias(libs.plugins.android.lint) | ||
} |
9 changes: 9 additions & 0 deletions
9
feature/funding/api/src/main/kotlin/app/k9mail/feature/funding/api/FundingManager.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package app.k9mail.feature.funding.api | ||
|
||
interface FundingManager { | ||
|
||
/** | ||
* Returns `true` if the app has a funding feature included. | ||
*/ | ||
fun isFundingFeatureIncluded(): Boolean | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
plugins { | ||
id(ThunderbirdPlugins.Library.androidCompose) | ||
} | ||
|
||
android { | ||
namespace = "app.k9mail.feature.funding.googleplay" | ||
resourcePrefix = "funding_googleplay_" | ||
} | ||
|
||
dependencies { | ||
api(projects.feature.funding.api) | ||
|
||
implementation(libs.android.billing) | ||
} |
9 changes: 9 additions & 0 deletions
9
...ure/funding/googleplay/src/main/kotlin/app/k9mail/feature/funding/FeatureFundingModule.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package app.k9mail.feature.funding | ||
|
||
import app.k9mail.feature.funding.api.FundingManager | ||
import app.k9mail.feature.funding.googleplay.GooglePlayFundingManager | ||
import org.koin.dsl.module | ||
|
||
val featureFundingModule = module { | ||
single<FundingManager> { GooglePlayFundingManager() } | ||
} |
9 changes: 9 additions & 0 deletions
9
...gleplay/src/main/kotlin/app/k9mail/feature/funding/googleplay/GooglePlayFundingManager.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package app.k9mail.feature.funding.googleplay | ||
|
||
import app.k9mail.feature.funding.api.FundingManager | ||
|
||
class GooglePlayFundingManager : FundingManager { | ||
override fun isFundingFeatureIncluded(): Boolean { | ||
return true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
plugins { | ||
id(ThunderbirdPlugins.Library.jvm) | ||
alias(libs.plugins.android.lint) | ||
} | ||
|
||
dependencies { | ||
api(projects.feature.funding.api) | ||
} |
9 changes: 9 additions & 0 deletions
9
feature/funding/noop/src/main/kotlin/app/k9mail/feature/funding/FeatureFundingModule.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package app.k9mail.feature.funding | ||
|
||
import app.k9mail.feature.funding.api.FundingManager | ||
import app.k9mail.feature.funding.noop.NoOpFundingManager | ||
import org.koin.dsl.module | ||
|
||
val featureFundingModule = module { | ||
single<FundingManager> { NoOpFundingManager() } | ||
} |
9 changes: 9 additions & 0 deletions
9
feature/funding/noop/src/main/kotlin/app/k9mail/feature/funding/noop/NoOpFundingManager.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package app.k9mail.feature.funding.noop | ||
|
||
import app.k9mail.feature.funding.api.FundingManager | ||
|
||
class NoOpFundingManager : FundingManager { | ||
override fun isFundingFeatureIncluded(): Boolean { | ||
return false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters