This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class MyApplication : Application() { | |
| override fun onCreate() { | |
| ... | |
| registerActivityLifecycleCallbacks(StartUpTimeActivityLifecycleCallbacks) | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apply plugin: 'com.android.application' | |
| ext.versionMajor = 1 | |
| ext.versionMinor = 2 | |
| ext.versionPatch = 3 | |
| ext.versionClassifier = null | |
| ext.isSnapshot = true | |
| android { | |
| defaultConfig { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| object CrashlyticsHelper { | |
| fun sendCustomKeys(context: Context) { | |
| val builder = CustomKeysAndValues.Builder() | |
| builder.putString("abi", Build.SUPPORTED_ABIS[0]) | |
| builder.putString("locale", getLocale(context).toString()) | |
| builder.putBoolean("isGooglePlayServicesAvailable", isGooglePlayServicesAvailable(context)) | |
| getInstallSource(context)?.let { | |
| builder.putString("installSource", it) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.gradle.api.Project | |
| import org.gradle.api.internal.GradleInternal | |
| import org.gradle.configurationcache.extensions.serviceOf | |
| import org.gradle.internal.logging.events.operations.LogEventBuildOperationProgressDetails | |
| import org.gradle.internal.operations.BuildOperationDescriptor | |
| import org.gradle.internal.operations.BuildOperationListener | |
| import org.gradle.internal.operations.BuildOperationListenerManager | |
| import org.gradle.internal.operations.OperationFinishEvent | |
| import org.gradle.internal.operations.OperationIdentifier | |
| import org.gradle.internal.operations.OperationProgressEvent |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| object AppUtils { | |
| // The package name of the application | |
| const val manifestPackageName = "com.example.myapp" | |
| // The application id of the application | |
| val applicationId: String | |
| get() { | |
| val context = ... | |
| // You could receive the context as parameter here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| plugins { | |
| id("com.dipien.byebyejetifier") version "1.1.2" apply false | |
| } | |
| ext { | |
| propertyResolver = new PropertyResolver(project) | |
| } | |
| if (propertyResolver.getBooleanProp(GradleProperty.BYE_BYE_JETIFIER_ENABLED)) { | |
| apply plugin: "com.dipien.byebyejetifier" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cd gradle/wrapper | |
| gradleVersion=$(grep "distributionUrl" gradle-wrapper.properties | grep -Po "(\d+\.)+\d+") | |
| curl --location --output gradle-wrapper.jar.sha256 https://services.gradle.org/distributions/gradle-${gradleVersion}-wrapper.jar.sha256 | |
| echo " gradle-wrapper.jar" >> gradle-wrapper.jar.sha256 | |
| sha256sum --check gradle-wrapper.jar.sha256 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def tasksToNotCache = [ | |
| "compile.*JavaWithJavac", | |
| "compile.*LibraryResources", | |
| "package.*Resources", | |
| "strip.*DebugSymbols", | |
| "mergeDebugAndroidTestNativeLibs", | |
| "generateDebugRFile", | |
| "dataBindingMergeDependencyArtifacts.*", | |
| "dataBindingMergeGenClasses.*", | |
| "bundleLibRuntimeToJarDebug", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| repositories { | |
| // This repository will not be searched for artifacts with group "my.company" | |
| // despite being declared first | |
| mavenCentral() | |
| exclusiveContent { | |
| forRepository { | |
| maven { | |
| url = uri("https://repo.mycompany.com/maven2") | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| buildscript { | |
| dependencies { | |
| classpath("com.dipien:bye-bye-jetifier:1.1.2") | |
| } | |
| } | |
| ext { | |
| propertyResolver = new PropertyResolver(project) | |
| } |