Skip to content

Commit

Permalink
Fix FirebaseFree build
Browse files Browse the repository at this point in the history
  • Loading branch information
dkrivoruchko committed Aug 2, 2021
1 parent 6a7d18c commit 71e6b03
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ android {
applicationId = "info.dvkr.screenstream"
minSdkVersion(21)
targetSdkVersion(30)
versionCode = 30704
versionName = "3.7.4"
versionCode = 30705
versionName = "3.7.5"
resConfigs("en", "ru", "pt-rBR", "zh-rTW", "fr-rFR", "fa", "it", "pl", "hi", "de", "sk", "es", "ar", "ja", "gl", "ca")

vectorDrawables.useSupportLibrary = true
Expand Down Expand Up @@ -45,11 +45,10 @@ android {
productFlavors {
create("firebase") {
manifestPlaceholders = ["adMobPubId": "${localProps.getProperty("ad.pubId")}"]
buildConfigField "String", "AD_UNIT_ID", localProps.getProperty("ad.unitId")
buildConfigField "String", "AD_UNIT_ID", localProps.getProperty("ad.unitId", "")
}
create("firebasefree") {
manifestPlaceholders = ["adMobPubId": ""]
// buildConfigField "String", "AD_UNIT_ID", "ca-app-pub-3940256099942544/6300978111"
firebaseCrashlytics.mappingFileUploadEnabled = false
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ abstract class AdFragment(@LayoutRes contentLayoutId: Int) : Fragment(contentLay
}

private fun loadAd(adViewContainer: FrameLayout) {
adViewContainer.minimumHeight = adSize.getHeightInPixels(requireContext())
viewLifecycleOwner.lifecycleScope.launchWhenStarted {
delay((requireActivity().application as BaseApp).lastAdLoadTime + 61_000 - System.currentTimeMillis())
MobileAds.initialize(requireActivity()) {}
adView = AdView(requireActivity()).also { adView ->
adViewContainer.addView(adView)
adViewContainer.minimumHeight = adSize.getHeightInPixels(requireContext())
adView.adUnitId = if (BuildConfig.DEBUG) TEST_AD_UNIT_ID else BuildConfig.AD_UNIT_ID;
adView.adSize = adSize
adView.loadAd(AdRequest.Builder().build())
Expand Down
2 changes: 1 addition & 1 deletion data/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ dependencies {

implementation("androidx.core:core:1.6.0")

implementation("io.ktor:ktor-server-cio:1.6.0")
implementation("io.ktor:ktor-server-cio:1.6.2")

implementation("com.github.iamironz:binaryprefs:1.0.1")
implementation('com.elvishew:xlog:1.11.0')
Expand Down

0 comments on commit 71e6b03

Please sign in to comment.