diff --git a/.github/ci-gradle.properties b/.github/ci-gradle.properties index 92ddadcbba..286117fc2a 100644 --- a/.github/ci-gradle.properties +++ b/.github/ci-gradle.properties @@ -1,6 +1,7 @@ org.gradle.daemon=false org.gradle.parallel=true -org.gradle.workers.max=2 kotlin.incremental=false -kotlin.compiler.execution.strategy=in-process \ No newline at end of file +kotlin.compiler.execution.strategy=in-process + +org.gradle.workers.max = 48 diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index d026870cc7..7ab9255079 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -2,9 +2,9 @@ name: PR on: pull_request -concurrency: - group: ref-${{ github.ref }} - cancel-in-progress: true +#concurrency: +# group: ref-${{ github.ref }} +# cancel-in-progress: true jobs: unit_test: @@ -27,7 +27,7 @@ jobs: uses: gradle/gradle-build-action@v2 with: # Only write to the cache for builds on the 'develop' branch - cache-read-only: false + cache-read-only: true gradle-home-cache-cleanup: true - name: Prebuild run: ./scripts/ci-prebuild.sh @@ -61,7 +61,7 @@ jobs: uses: gradle/gradle-build-action@v2 with: # Only write to the cache for builds on the 'develop' branch - cache-read-only: false + cache-read-only: true gradle-home-cache-cleanup: true - name: Prebuild run: ./scripts/ci-prebuild.sh @@ -94,7 +94,7 @@ jobs: uses: gradle/gradle-build-action@v2 with: # Only write to the cache for builds on the 'develop' branch - cache-read-only: false + cache-read-only: true gradle-home-cache-cleanup: true - name: Prebuild run: ./scripts/ci-prebuild.sh @@ -131,7 +131,7 @@ jobs: uses: gradle/gradle-build-action@v2 with: # Only write to the cache for builds on the 'develop' branch - cache-read-only: false + cache-read-only: true gradle-home-cache-cleanup: true - run: echo VERSION_CODE=$(expr 4700 + ${{ github.run_number }} + ${{ github.run_attempt }} - 1) >> $GITHUB_ENV - uses: chkfung/android-version-actions@v1.2 diff --git a/app/apollo/apollo-giraffe-public/src/main/kotlin/com/hedvig/android/apollo/giraffe/di/GiraffeModule.kt b/app/apollo/apollo-giraffe-public/src/main/kotlin/com/hedvig/android/apollo/giraffe/di/GiraffeModule.kt index 38b9422629..6a22a89c49 100644 --- a/app/apollo/apollo-giraffe-public/src/main/kotlin/com/hedvig/android/apollo/giraffe/di/GiraffeModule.kt +++ b/app/apollo/apollo-giraffe-public/src/main/kotlin/com/hedvig/android/apollo/giraffe/di/GiraffeModule.kt @@ -6,6 +6,9 @@ import org.koin.dsl.module @Suppress("RemoveExplicitTypeArguments") val giraffeModule = module { + publicAndroidModuleFunction("").also { + it + 1 + } single(giraffeClient) { val hedvigBuildConstants = get() get().copy() @@ -14,3 +17,7 @@ val giraffeModule = module { .build() } } + +fun publicAndroidModuleFunction(input: String): Int { + return 3 +} diff --git a/app/app/src/main/kotlin/com/hedvig/app/feature/loggedin/ui/LoggedInActivity.kt b/app/app/src/main/kotlin/com/hedvig/app/feature/loggedin/ui/LoggedInActivity.kt index ce0722460a..f5e51b4b6a 100644 --- a/app/app/src/main/kotlin/com/hedvig/app/feature/loggedin/ui/LoggedInActivity.kt +++ b/app/app/src/main/kotlin/com/hedvig/app/feature/loggedin/ui/LoggedInActivity.kt @@ -32,6 +32,7 @@ import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.only import androidx.compose.foundation.layout.systemBars import androidx.compose.foundation.layout.union +import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Surface import androidx.compose.material3.windowsizeclass.calculateWindowSizeClass @@ -42,6 +43,7 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.composed import androidx.compose.ui.platform.LocalDensity +import androidx.compose.ui.res.painterResource import androidx.compose.ui.unit.LayoutDirection import androidx.compose.ui.unit.dp import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen @@ -64,6 +66,7 @@ import com.hedvig.android.core.buildconstants.HedvigBuildConstants import com.hedvig.android.core.demomode.DemoManager import com.hedvig.android.core.designsystem.material3.motion.MotionTokens import com.hedvig.android.core.designsystem.theme.HedvigTheme +import com.hedvig.android.core.icons.PublicApiChangeClass import com.hedvig.android.data.settings.datastore.SettingsDataStore import com.hedvig.android.hanalytics.featureflags.FeatureManager import com.hedvig.android.hanalytics.featureflags.flags.Feature @@ -123,6 +126,7 @@ class LoggedInActivity : AppCompatActivity() { super.onCreate(savedInstanceState) WindowCompat.setDecorFitsSystemWindows(window, false) + iAmAPublicMethodInAppModule("input") val intent: Intent = intent val uri: Uri? = intent.data lifecycleScope.launch { @@ -216,6 +220,10 @@ class LoggedInActivity : AppCompatActivity() { setContent { val market by marketManager.market.collectAsStateWithLifecycle() + Icon( + painterResource(com.hedvig.android.core.icons.R.drawable.ic_info_abi), + PublicApiChangeClass().helloCi().string + PubAppClass().hello(), + ) HedvigTheme { val windowSizeClass = calculateWindowSizeClass(this) HedvigApp( @@ -422,3 +430,13 @@ private fun Theme.apply() = when (this) { } } } + +fun iAmAPublicMethodInAppModule(input: String): Int { + return 1 +} + +class PubAppClass { + fun hello(): Int { + return 1 + } +} diff --git a/app/core/core-icons/src/main/kotlin/com/hedvig/android/core/icons/PublicApiChangeClass.kt b/app/core/core-icons/src/main/kotlin/com/hedvig/android/core/icons/PublicApiChangeClass.kt new file mode 100644 index 0000000000..5ed63a9f57 --- /dev/null +++ b/app/core/core-icons/src/main/kotlin/com/hedvig/android/core/icons/PublicApiChangeClass.kt @@ -0,0 +1,9 @@ +package com.hedvig.android.core.icons + +class PublicApiChangeClass { + fun helloCi(): MyString { + return MyString("2 + 2 + 4 - 1") + } +} + +class MyString(val string: String) diff --git a/app/core/core-icons/src/main/res/drawable/ic_info_abi.xml b/app/core/core-icons/src/main/res/drawable/ic_info_abi.xml new file mode 100644 index 0000000000..3703dbc572 --- /dev/null +++ b/app/core/core-icons/src/main/res/drawable/ic_info_abi.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/feature/feature-home/src/main/kotlin/com/hedvig/android/feature/home/home/ui/HomeDestination.kt b/app/feature/feature-home/src/main/kotlin/com/hedvig/android/feature/home/home/ui/HomeDestination.kt index c4ca75b4ab..9a2eb4735a 100644 --- a/app/feature/feature-home/src/main/kotlin/com/hedvig/android/feature/home/home/ui/HomeDestination.kt +++ b/app/feature/feature-home/src/main/kotlin/com/hedvig/android/feature/home/home/ui/HomeDestination.kt @@ -27,6 +27,7 @@ import androidx.compose.material.icons.Icons import androidx.compose.material3.ButtonDefaults import androidx.compose.material3.CardDefaults import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Surface import androidx.compose.material3.Text @@ -45,6 +46,7 @@ import androidx.compose.ui.layout.onSizeChanged import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.platform.LocalDensity import androidx.compose.ui.platform.testTag +import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.IntSize @@ -66,6 +68,7 @@ import com.hedvig.android.core.designsystem.material3.warningElement import com.hedvig.android.core.designsystem.preview.HedvigPreview import com.hedvig.android.core.designsystem.theme.HedvigTheme import com.hedvig.android.core.icons.Hedvig +import com.hedvig.android.core.icons.PublicApiChangeClass import com.hedvig.android.core.icons.hedvig.normal.WarningFilled import com.hedvig.android.core.ui.appbar.m3.ToolbarChatIcon import com.hedvig.android.core.ui.appbar.m3.TopAppBarLayoutForActions @@ -103,6 +106,8 @@ import kotlinx.datetime.toJavaLocalDate import java.time.format.DateTimeFormatter import java.time.format.FormatStyle + + @Composable internal fun HomeDestination( viewModel: HomeViewModel, @@ -118,6 +123,10 @@ internal fun HomeDestination( ) { val uiState by viewModel.uiState.collectAsStateWithLifecycle() val notificationPermissionState = rememberNotificationPermissionState() + Icon( + painterResource(com.hedvig.android.core.icons.R.drawable.ic_info_abi), + PublicApiChangeClass().helloCi().string, + ) HomeScreen( uiState = uiState, notificationPermissionState = notificationPermissionState, diff --git a/app/feature/feature-profile/src/main/kotlin/com/hedvig/android/feature/profile/payment/PaymentDestination.kt b/app/feature/feature-profile/src/main/kotlin/com/hedvig/android/feature/profile/payment/PaymentDestination.kt index d11495d6e8..35c32646e9 100644 --- a/app/feature/feature-profile/src/main/kotlin/com/hedvig/android/feature/profile/payment/PaymentDestination.kt +++ b/app/feature/feature-profile/src/main/kotlin/com/hedvig/android/feature/profile/payment/PaymentDestination.kt @@ -54,6 +54,7 @@ import com.hedvig.android.core.designsystem.material3.typeElement import com.hedvig.android.core.designsystem.preview.HedvigPreview import com.hedvig.android.core.designsystem.theme.HedvigTheme import com.hedvig.android.core.icons.Hedvig +import com.hedvig.android.core.icons.PublicApiChangeClass import com.hedvig.android.core.icons.hedvig.normal.Payments import com.hedvig.android.core.icons.hedvig.normal.Waiting import com.hedvig.android.core.ui.clearFocusOnTap @@ -81,6 +82,10 @@ internal fun PaymentDestination( market: Market, ) { val uiState by viewModel.uiState.collectAsStateWithLifecycle() + Icon( + painterResource(com.hedvig.android.core.icons.R.drawable.ic_info_abi), + PublicApiChangeClass().helloCi().string, + ) PaymentScreen( uiState = uiState, locale = viewModel.languageService.getLocale(), diff --git a/app/feature/feature-profile/src/main/kotlin/com/hedvig/android/feature/profile/tab/ProfileDestination.kt b/app/feature/feature-profile/src/main/kotlin/com/hedvig/android/feature/profile/tab/ProfileDestination.kt index 29c0944d93..6e36e78040 100644 --- a/app/feature/feature-profile/src/main/kotlin/com/hedvig/android/feature/profile/tab/ProfileDestination.kt +++ b/app/feature/feature-profile/src/main/kotlin/com/hedvig/android/feature/profile/tab/ProfileDestination.kt @@ -41,6 +41,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.platform.LocalDensity import androidx.compose.ui.platform.testTag +import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp import androidx.lifecycle.compose.collectAsStateWithLifecycle @@ -49,6 +50,7 @@ import com.hedvig.android.core.designsystem.component.button.HedvigTextButton import com.hedvig.android.core.designsystem.preview.HedvigPreview import com.hedvig.android.core.designsystem.theme.HedvigTheme import com.hedvig.android.core.icons.Hedvig +import com.hedvig.android.core.icons.PublicApiChangeClass import com.hedvig.android.core.icons.hedvig.normal.ContactInformation import com.hedvig.android.core.icons.hedvig.normal.Eurobonus import com.hedvig.android.core.icons.hedvig.normal.Info @@ -77,6 +79,10 @@ internal fun ProfileDestination( viewModel: ProfileViewModel, ) { val uiState by viewModel.data.collectAsStateWithLifecycle() + Icon( + painterResource(com.hedvig.android.core.icons.R.drawable.ic_info_abi), + PublicApiChangeClass().helloCi().string, + ) ProfileScreen( uiState = uiState, reload = viewModel::reload, diff --git a/app/logging/logging-public/src/main/kotlin/com/hedvig/android/logger/Logcat.kt b/app/logging/logging-public/src/main/kotlin/com/hedvig/android/logger/Logcat.kt index f1efb0bde1..050d81e510 100644 --- a/app/logging/logging-public/src/main/kotlin/com/hedvig/android/logger/Logcat.kt +++ b/app/logging/logging-public/src/main/kotlin/com/hedvig/android/logger/Logcat.kt @@ -9,7 +9,12 @@ inline fun logcat( throwable: Throwable? = null, noinline message: () -> String, ) { + publicFunctionInLeafJvmModule() with(LogcatLogger.logger) { log(priority, throwable, message) } } + +fun publicFunctionInLeafJvmModule() { + println("publicFunctionInLeafJvmModule + ${1 + 2}") +} diff --git a/app/logging/logging-public/src/main/kotlin/com/hedvig/android/logger/LogcatLogger.kt b/app/logging/logging-public/src/main/kotlin/com/hedvig/android/logger/LogcatLogger.kt index 306d2a2204..705951c713 100644 --- a/app/logging/logging-public/src/main/kotlin/com/hedvig/android/logger/LogcatLogger.kt +++ b/app/logging/logging-public/src/main/kotlin/com/hedvig/android/logger/LogcatLogger.kt @@ -1,5 +1,7 @@ package com.hedvig.android.logger +import com.hedvig.android.logger.LogcatLogger.NoLog.publicFunctionInInterface + /** * Logger that [logcat] delegates to. Call [install] to install a new logger, the default is a * no-op logger. Calling [uninstall] falls back to the default no-op logger. @@ -49,6 +51,7 @@ interface LogcatLogger { */ fun uninstall() { synchronized(this) { + publicFunctionInInterface() installedThrowable = null logger = NoLog } @@ -65,4 +68,8 @@ interface LogcatLogger { message: () -> String, ) = error("Should never receive any log") } + + fun publicFunctionInInterface() { + println("publicFunctionInInterface + ${1 + 2}") + } } diff --git a/gradle.properties b/gradle.properties index c52c0d6262..b0364f874c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,9 @@ # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. # Ensure important default jvmargs aren't overwritten. See https://github.com/gradle/gradle/issues/19750 -org.gradle.jvmargs=-Xmx9216M -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:MaxMetaspaceSize=1g +#org.gradle.jvmargs=-Xmx9216M -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:MaxMetaspaceSize=1g +org.gradle.jvmargs=-Xms128g -Xmx128g -XX:MaxMetaspaceSize=1g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC +org.gradle.workers.max = 48 # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit