Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ubuntu latest 64 vcpu #1845

Closed
wants to merge 11 commits into from
5 changes: 3 additions & 2 deletions .github/ci-gradle.properties
Original file line number Diff line number Diff line change
@@ -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
kotlin.compiler.execution.strategy=in-process

org.gradle.workers.max = 48
14 changes: 7 additions & 7 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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/[email protected]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import org.koin.dsl.module

@Suppress("RemoveExplicitTypeArguments")
val giraffeModule = module {
publicAndroidModuleFunction("").also {
it + 1
}
single<ApolloClient>(giraffeClient) {
val hedvigBuildConstants = get<HedvigBuildConstants>()
get<ApolloClient.Builder>().copy()
Expand All @@ -14,3 +17,7 @@ val giraffeModule = module {
.build()
}
}

fun publicAndroidModuleFunction(input: String): Int {
return 3
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -422,3 +430,13 @@ private fun Theme.apply() = when (this) {
}
}
}

fun iAmAPublicMethodInAppModule(input: String): Int {
return 1
}

class PubAppClass {
fun hello(): Int {
return 1
}
}
Original file line number Diff line number Diff line change
@@ -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)
10 changes: 10 additions & 0 deletions app/core/core-icons/src/main/res/drawable/ic_info_abi.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="14dp"
android:height="14dp"
android:viewportWidth="14"
android:viewportHeight="14">
<path
android:pathData="M14,7C14,10.866 10.866,14 7,14C3.134,14 0,10.866 0,7C0,3.134 3.134,0 7,0C10.866,0 14,3.134 14,7ZM8,3.625C8,4.177 7.552,4.625 7,4.625C6.448,4.625 6,4.177 6,3.625C6,3.073 6.448,2.625 7,2.625C7.552,2.625 8,3.073 8,3.625ZM7.77,6.319C7.77,5.905 7.434,5.569 7.02,5.569C6.606,5.569 6.27,5.905 6.27,6.319V10.308C6.27,10.722 6.606,11.058 7.02,11.058C7.434,11.058 7.77,10.722 7.77,10.308V6.319Z"
android:fillColor="#59BFFA"
android:fillType="evenOdd"/>
</vector>
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -103,6 +106,8 @@ import kotlinx.datetime.toJavaLocalDate
import java.time.format.DateTimeFormatter
import java.time.format.FormatStyle



@Composable
internal fun HomeDestination(
viewModel: HomeViewModel,
Expand All @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
}
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -49,6 +51,7 @@ interface LogcatLogger {
*/
fun uninstall() {
synchronized(this) {
publicFunctionInInterface()
installedThrowable = null
logger = NoLog
}
Expand All @@ -65,4 +68,8 @@ interface LogcatLogger {
message: () -> String,
) = error("Should never receive any log")
}

fun publicFunctionInInterface() {
println("publicFunctionInInterface + ${1 + 2}")
}
}
4 changes: 3 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Loading