Skip to content
Snippets Groups Projects
Commit 5f9df7a5 authored by Taras's avatar Taras
Browse files

Create flavours for auth module

parent 5a31ddda
No related branches found
No related tags found
No related merge requests found
......@@ -37,6 +37,17 @@ android {
}
}
def flavor_dimension_name = "store"
flavorDimensions.add(flavor_dimension_name)
productFlavors {
gplay {
dimension flavor_dimension_name
}
fdroid {
dimension flavor_dimension_name
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
......@@ -62,7 +73,7 @@ dependencies {
implementation 'com.nulab-inc:zxcvbn:1.8.2'
//Subscriptions
implementation 'com.android.billingclient:billing-ktx:6.1.0'
gplayImplementation 'com.android.billingclient:billing-ktx:6.1.0'
//QR
implementation 'com.github.yuriy-budiyev:code-scanner:2.3.2'
......@@ -81,35 +92,35 @@ kapt {
correctErrorTypes = true
}
def groupIdString = "org.futo.circles"
def artifactIdString = "auth"
afterEvaluate {
Properties properties = new Properties()
if (rootProject.file("local.properties").exists()) {
properties.load(rootProject.file("local.properties").newDataInputStream())
}
publishing {
publications {
release(MavenPublication) {
from components.release
groupId groupIdString
artifactId artifactIdString
version rootProject.ext.modules_version
}
}
repositories {
maven {
url "https://gitlab.futo.org/api/v4/projects/$rootProject.ext.modules_gitlab_projectId/packages/maven"
name "GitLab"
credentials(HttpHeaderCredentials) {
name = "Private-Token"
value = properties.getProperty("PUBLISH_TOKEN")
}
authentication {
header(HttpHeaderAuthentication)
}
}
}
}
}
\ No newline at end of file
//def groupIdString = "org.futo.circles"
//def artifactIdString = "auth"
//
//afterEvaluate {
// Properties properties = new Properties()
// if (rootProject.file("local.properties").exists()) {
// properties.load(rootProject.file("local.properties").newDataInputStream())
// }
// publishing {
// publications {
// release(MavenPublication) {
// from components.release
// groupId groupIdString
// artifactId artifactIdString
// version rootProject.ext.modules_version
// }
// }
// repositories {
// maven {
// url "https://gitlab.futo.org/api/v4/projects/$rootProject.ext.modules_gitlab_projectId/packages/maven"
// name "GitLab"
// credentials(HttpHeaderCredentials) {
// name = "Private-Token"
// value = properties.getProperty("PUBLISH_TOKEN")
// }
// authentication {
// header(HttpHeaderAuthentication)
// }
// }
// }
// }
//}
\ No newline at end of file
package org.futo.circles.auth.di
import androidx.fragment.app.Fragment
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import org.futo.circles.auth.subscriptions.ItemPurchasedListener
import org.futo.circles.auth.subscriptions.SubscriptionManager
import org.futo.circles.auth.subscriptions.SubscriptionProvider
@Module
@InstallIn(SingletonComponent::class)
object SubscriptionsModule {
@Provides
fun provideSubscriptionProvider(): SubscriptionProvider {
return object : SubscriptionProvider {
override fun getManager(
fragment: Fragment,
itemPurchaseListener: ItemPurchasedListener?
): SubscriptionManager =
throw IllegalArgumentException("subscriptions is not supported for F-Droid")
}
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment