diff --git a/app/build.gradle b/app/build.gradle
index 99eb0f9..cb5bdc8 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -39,17 +39,6 @@ android {
}
}
- flavorDimensions = ["version"]
- productFlavors {
- irMarket {
- dimension "version"
- }
-
- free {
- dimension "version"
- }
- }
-
buildTypes {
release {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
@@ -90,7 +79,6 @@ android {
dependencies {
//core android
implementation("androidx.core:core-ktx:1.12.0")
- implementation("androidx.core:core-splashscreen:1.0.1")
//compose
def material3_version = "1.1.2"
implementation("androidx.compose.ui:ui:$compose_ui_libs_version")
@@ -106,6 +94,4 @@ dependencies {
implementation("androidx.navigation:navigation-compose:$nav_version")
//datastore
implementation("androidx.datastore:datastore-preferences:1.0.0")
- //ad
- irMarketImplementation("ir.tapsell.plus:tapsell-plus-sdk-android:2.2.0")
}
\ No newline at end of file
diff --git a/app/src/free/AndroidManifest.xml b/app/src/free/AndroidManifest.xml
deleted file mode 100644
index dfccb8d..0000000
--- a/app/src/free/AndroidManifest.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/irMarket/java/io/github/yamin8000/dooz/ad/AdComposables.kt b/app/src/irMarket/java/io/github/yamin8000/dooz/ad/AdComposables.kt
deleted file mode 100644
index 73d29fb..0000000
--- a/app/src/irMarket/java/io/github/yamin8000/dooz/ad/AdComposables.kt
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Owl/Owl.app.main
- * AdComposables.kt Copyrighted by Yamin Siahmargooei at 2023/4/22
- * AdComposables.kt Last modified at 2023/4/22
- * This file is part of Owl/Owl.app.main.
- * Copyright (C) 2023 Yamin Siahmargooei
- *
- * Owl/Owl.app.main is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Owl/Owl.app.main is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Owl. If not, see .
- */
-
-package io.github.yamin8000.dooz.ad
-
-import android.view.LayoutInflater
-import android.view.ViewGroup
-import androidx.compose.material3.Surface
-import androidx.compose.runtime.Composable
-import androidx.compose.ui.Modifier
-import androidx.compose.ui.platform.LocalContext
-import androidx.compose.ui.viewinterop.AndroidView
-import io.github.yamin8000.dooz.R
-
-@Composable
-internal fun TapsellAdContent(
- modifier: Modifier = Modifier,
- onCreated: (ViewGroup) -> Unit,
- onUpdate: (ViewGroup) -> Unit
-) {
- val context = LocalContext.current
- Surface {
- AndroidView(
- modifier = modifier,
- update = onUpdate,
- factory = {
- val view = LayoutInflater.from(context)
- .inflate(R.layout.standard_banner, null, false)
- .findViewById(R.id.standardBanner)
- onCreated(view)
- view
- }
- )
- }
-}
\ No newline at end of file
diff --git a/app/src/irMarket/java/io/github/yamin8000/dooz/ad/AdHelper.kt b/app/src/irMarket/java/io/github/yamin8000/dooz/ad/AdHelper.kt
deleted file mode 100644
index eec6795..0000000
--- a/app/src/irMarket/java/io/github/yamin8000/dooz/ad/AdHelper.kt
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Owl/Owl.app.main
- * AdHelper.kt Copyrighted by Yamin Siahmargooei at 2023/4/22
- * AdHelper.kt Last modified at 2023/4/22
- * This file is part of Owl/Owl.app.main.
- * Copyright (C) 2023 Yamin Siahmargooei
- *
- * Owl/Owl.app.main is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Owl/Owl.app.main is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Owl. If not, see .
- */
-
-package io.github.yamin8000.dooz.ad
-
-import android.app.Activity
-import android.view.ViewGroup
-import io.github.yamin8000.dooz.util.Utility.log
-import ir.tapsell.plus.AdRequestCallback
-import ir.tapsell.plus.AdShowListener
-import ir.tapsell.plus.TapsellPlus
-import ir.tapsell.plus.TapsellPlusBannerType
-import ir.tapsell.plus.model.TapsellPlusAdModel
-import ir.tapsell.plus.model.TapsellPlusErrorModel
-import kotlinx.coroutines.suspendCancellableCoroutine
-import kotlin.coroutines.resume
-import kotlin.coroutines.suspendCoroutine
-
-internal object AdHelper {
-
- internal suspend fun showTapsellAd(
- activity: Activity,
- adId: String,
- adView: ViewGroup?
- ) = suspendCoroutine {
- TapsellPlus.showStandardBannerAd(
- activity,
- adId,
- adView,
- object : AdShowListener() {
- override fun onOpened(tapsellPlusAdModel: TapsellPlusAdModel) {
- super.onOpened(tapsellPlusAdModel)
- log(tapsellPlusAdModel.responseId)
- }
-
- override fun onError(tapsellPlusErrorModel: TapsellPlusErrorModel) {
- super.onError(tapsellPlusErrorModel)
- log(tapsellPlusErrorModel.errorMessage)
- }
- })
- }
-
- internal suspend fun requestTapsellAd(
- activity: Activity
- ) = suspendCancellableCoroutine { cancellableContinuation ->
- TapsellPlus.requestStandardBannerAd(
- activity,
- AdConstants.STANDARD_BANNER_ZONE_ID,
- TapsellPlusBannerType.BANNER_320x50,
- object : AdRequestCallback() {
- override fun response(ad: TapsellPlusAdModel?) {
- super.response(ad)
- cancellableContinuation.resume(ad?.responseId ?: "")
- }
-
- override fun error(error: String?) {
- super.error(error)
- log(error ?: "Unknown Tapsell Ad Request error")
- }
- }
- )
- }
-}
\ No newline at end of file
diff --git a/app/src/irMarket/java/io/github/yamin8000/dooz/content/MainActivity.kt b/app/src/irMarket/java/io/github/yamin8000/dooz/content/MainActivity.kt
deleted file mode 100644
index fe7b66d..0000000
--- a/app/src/irMarket/java/io/github/yamin8000/dooz/content/MainActivity.kt
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Dooz/Dooz.app.main
- * AdMainActivity.kt Copyrighted by Yamin Siahmargooei at 2023/4/22
- * AdMainActivity.kt Last modified at 2023/4/22
- * This file is part of Dooz/Dooz.app.main.
- * Copyright (C) 2023 Yamin Siahmargooei
- *
- * Dooz/Dooz.app.main is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Dooz/Dooz.app.main is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Dooz. If not, see .
- */
-
-package io.github.yamin8000.dooz.content
-
-import android.os.Bundle
-import android.view.ViewGroup
-import androidx.activity.ComponentActivity
-import androidx.activity.compose.setContent
-import androidx.compose.foundation.layout.fillMaxWidth
-import androidx.compose.foundation.layout.padding
-import androidx.compose.foundation.layout.wrapContentHeight
-import androidx.compose.runtime.Composable
-import androidx.compose.runtime.LaunchedEffect
-import androidx.compose.runtime.getValue
-import androidx.compose.runtime.mutableStateOf
-import androidx.compose.runtime.remember
-import androidx.compose.runtime.setValue
-import androidx.compose.ui.Modifier
-import androidx.compose.ui.unit.dp
-import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
-import androidx.core.view.WindowCompat
-import io.github.yamin8000.dooz.ad.AdConstants
-import io.github.yamin8000.dooz.ad.AdHelper
-import io.github.yamin8000.dooz.ad.TapsellAdContent
-import io.github.yamin8000.dooz.util.Utility.log
-import ir.tapsell.plus.TapsellPlus
-import ir.tapsell.plus.TapsellPlusInitListener
-import ir.tapsell.plus.model.AdNetworkError
-import ir.tapsell.plus.model.AdNetworks
-
-class MainActivity : ComponentActivity() {
-
- override fun onCreate(savedInstanceState: Bundle?) {
- installSplashScreen()
- super.onCreate(savedInstanceState)
- initTapsellAd()
- setContent {
- MainNavigation(adContent = { AdContent() })
- }
- WindowCompat.setDecorFitsSystemWindows(window, false)
- }
-
-
- @Composable
- fun AdContent() {
- var adView by remember { mutableStateOf(null) }
- var adId: String by remember { mutableStateOf("") }
-
- LaunchedEffect(Unit) {
- adId = AdHelper.requestTapsellAd(this@MainActivity)
- AdHelper.showTapsellAd(this@MainActivity, adId, adView)
- }
-
- TapsellAdContent(
- modifier = Modifier
- .wrapContentHeight()
- .padding(4.dp)
- .fillMaxWidth(),
- onCreated = { adView = it },
- onUpdate = { adView = it }
- )
- }
-
- private fun initTapsellAd() {
- log("ad init")
- TapsellPlus.initialize(this, AdConstants.TAPSELL_KEY, object : TapsellPlusInitListener {
- override fun onInitializeSuccess(ads: AdNetworks?) {
- log(ads?.name ?: "Unknown ad name")
- }
-
- override fun onInitializeFailed(ads: AdNetworks?, error: AdNetworkError?) {
- log(error?.errorMessage ?: "Unknown tapsell init error")
- }
- })
- }
-}
diff --git a/app/src/irMarket/res/layout/standard_banner.xml b/app/src/irMarket/res/layout/standard_banner.xml
deleted file mode 100644
index 405d7aa..0000000
--- a/app/src/irMarket/res/layout/standard_banner.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 403992a..5ba3806 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -22,7 +22,6 @@
xmlns:tools="http://schemas.android.com/tools">
-
+ android:theme="@style/Theme.Dooz">
diff --git a/app/src/main/java/io/github/yamin8000/dooz/content/About.kt b/app/src/main/java/io/github/yamin8000/dooz/content/About.kt
index 034694c..f03e613 100644
--- a/app/src/main/java/io/github/yamin8000/dooz/content/About.kt
+++ b/app/src/main/java/io/github/yamin8000/dooz/content/About.kt
@@ -77,18 +77,6 @@ internal fun AboutContent(onBackClick: () -> Unit) {
)
}
)
- Row(
- modifier = Modifier.fillMaxWidth(),
- verticalAlignment = Alignment.CenterVertically,
- horizontalArrangement = Arrangement.spacedBy(
- 8.dp,
- Alignment.CenterHorizontally
- )
- ) {
- val version = stringResource(R.string.version_name)
- PersianText("$version - ${BuildConfig.FLAVOR}")
- PersianText(BuildConfig.VERSION_NAME)
- }
PersianText(
text = stringResource(R.string.license_header),
modifier = Modifier.fillMaxWidth()
diff --git a/app/src/free/java/io/github/yamin8000/dooz/content/MainActivity.kt b/app/src/main/java/io/github/yamin8000/dooz/content/MainActivity.kt
similarity index 92%
rename from app/src/free/java/io/github/yamin8000/dooz/content/MainActivity.kt
rename to app/src/main/java/io/github/yamin8000/dooz/content/MainActivity.kt
index 408044c..87b6589 100644
--- a/app/src/free/java/io/github/yamin8000/dooz/content/MainActivity.kt
+++ b/app/src/main/java/io/github/yamin8000/dooz/content/MainActivity.kt
@@ -24,13 +24,12 @@ package io.github.yamin8000.dooz.content
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
-import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
import androidx.core.view.WindowCompat
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
- installSplashScreen()
+
super.onCreate(savedInstanceState)
setContent { MainNavigation(adContent = { }) }
WindowCompat.setDecorFitsSystemWindows(window, false)
diff --git a/app/src/main/java/io/github/yamin8000/dooz/content/game/GameContent.kt b/app/src/main/java/io/github/yamin8000/dooz/content/game/GameContent.kt
index e81f739..054feae 100644
--- a/app/src/main/java/io/github/yamin8000/dooz/content/game/GameContent.kt
+++ b/app/src/main/java/io/github/yamin8000/dooz/content/game/GameContent.kt
@@ -152,7 +152,7 @@ fun GameContent(
exit = scaleOut()
) {
GameBoard(
- gameSize = gameState.gameSize.value,
+ gameSize = gameState.gameSize.intValue,
gameCells = gameState.gameCells.value,
winnerCells = gameState.winnerCells.value,
isGameFinished = gameState.isGameFinished.value,
diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml
index fb62b2f..cc30945 100644
--- a/app/src/main/res/values/themes.xml
+++ b/app/src/main/res/values/themes.xml
@@ -18,16 +18,7 @@
~ along with Dooz. If not, see .
-->
-
+
-
-
\ No newline at end of file
diff --git a/gradle.properties b/gradle.properties
index 0e2ec80..cbc0e1a 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -40,5 +40,4 @@ kotlin.code.style=official
# Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
-android.enableR8.fullMode=false
-android.enableBuildConfigAsBytecode = true
\ No newline at end of file
+android.enableR8.fullMode=false
\ No newline at end of file
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 61e7ee7..79e2fbf 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=e111cb9948407e26351227dabce49822fb88c37ee72f1d1582a69c68af2e702f
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists