Skip to content

Commit

Permalink
Merge branch 'enhance-gradle-structure' into #848-update-dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
piotradamczyk5 authored Sep 18, 2020
2 parents 23b6fec + 0872fde commit afcf59f
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ jobs:
arguments: "test_runner:publish -PGITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}"

- name: Post Message of Flank Release
uses: Flank/flank@V1.1-action
uses: Flank/flank@V1.2-action
if: startsWith(github.ref, 'refs/tags/v')
with:
xoxctoken: ${{ secrets.SLACK_XOXCTOKEN }}
Expand Down
2 changes: 2 additions & 0 deletions buildSrc/src/main/kotlin/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ object Dependencies {

const val JANSI = "org.fusesource.jansi:jansi:${Versions.JANSI}"

const val PROGUARD = "com.guardsquare:proguard-gradle:${Versions.PROGUARD}"

//region Plugins
const val DETEKT_FORMATTING = "io.gitlab.arturbosch.detekt:detekt-formatting:${Versions.DETEKT}"
//endregion
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ object Versions {

// https://github.com/ben-manes/gradle-versions-plugin/releases
const val BEN_MANES = "0.28.0"

const val PROGUARD = "7.0.0"

// ============== flank-scripts ==============
const val KOTLINX_SERIALIZATION = "1.0.0-RC"
Expand Down
2 changes: 2 additions & 0 deletions integration_tests/src/test/kotlin/IntegrationTests.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import org.junit.Assert.assertEquals
import org.junit.Assert.assertTrue
import org.junit.Ignore
import org.junit.Test
import utils.toStringMap

Expand All @@ -25,6 +26,7 @@ class IntegrationTests {
)
}

@Ignore("iOS has only physical devices, whit current configuration flank's project hits quota limit extremely fast")
@Test
fun shouldMatchIosSuccessExitCodeAndPattern() {
val testParameters = System.getProperties().toStringMap().toIosParameters()
Expand Down
13 changes: 13 additions & 0 deletions test_runner/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ shadowJar.apply {
exclude(dependency(Dependencies.TRUTH))
exclude(dependency(Dependencies.MOCKK))
exclude(dependency(Dependencies.JUNIT))
exclude(dependency(Dependencies.PROGUARD))
exclude(dependency(Dependencies.DETEKT_FORMATTING))
}
}
Expand Down Expand Up @@ -250,6 +251,18 @@ dependencies {
implementation(Dependencies.JANSI)
}

buildscript {
repositories {
mavenLocal()
jcenter()
google()
}
dependencies {
classpath(Dependencies.PROGUARD)
}
}


tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
}
Expand Down
70 changes: 70 additions & 0 deletions test_runner/proguard/config.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
-dontobfuscate
-allowaccessmodification
-keepattributes SourceFile, LineNumberTable
-dontwarn
-verbose
-dontoptimize
-dontnote kotlin.**
-dontnote kotlinx.**
-dontnote com.google.gson.**
-dontnote proguard.configuration.ConfigurationLogger

-keep class ftl.Main {
public static void main(java.lang.String[]);
}

#Kotlin
-keepnames class kotlinx.coroutines.internal.MainDispatcherFactory {}
-keepnames class kotlinx.coroutines.CoroutineExceptionHandler {}
-keepnames class kotlinx.coroutines.android.AndroidExceptionPreHandler {}
-keepnames class kotlinx.coroutines.android.AndroidDispatcherFactory {}

-keep class kotlinx.coroutines.internal.MainDispatcherFactory {}
-keep class kotlinx.coroutines.CoroutineExceptionHandler {}
-keep class kotlinx.coroutines.android.AndroidExceptionPreHandler {}
-keep class kotlinx.coroutines.android.AndroidDispatcherFactory {}

# Most of volatile fields are updated with AFU and should not be mangled
-keepclassmembernames class kotlinx.** {
volatile <fields>;
}

# Proguard configuration for Jackson 2.x
-keep class com.fasterxml.jackson.databind.ObjectMapper {
public <methods>;
protected <methods>;
}
-keep class com.fasterxml.jackson.databind.ObjectWriter {
public ** writeValueAsString(**);
}
-keepnames class com.fasterxml.jackson.** { *; }
-keep class kotlin.Metadata { *; }
-keep class kotlin.reflect.** { *; }

-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}

-keep class com.bugsnag.android.NativeInterface { *; }
-keep class com.bugsnag.android.Breadcrumb { *; }
-keep class com.bugsnag.android.Breadcrumbs { *; }
-keep class com.bugsnag.android.Breadcrumbs$Breadcrumb { *; }
-keep class com.bugsnag.android.BreadcrumbType { *; }
-keep class com.bugsnag.android.Severity { *; }
-keep class com.bugsnag.android.ndk.BugsnagObserver { *; }
# Picocli
-keep class picocli.** { *; }
-keep interface picocli.** { *; }

#ftl
-keep class ftl.** { *; }
-keep interface ftl.** { *; }

#google auth
-keep class com.google.auth.** { *; }
-keep interface com.google.auth.** { *; }

#ctc wstx
-keep class com.ctc.wstx.** { *; }
-keep interface com.ctc.wstx.** { *; }

0 comments on commit afcf59f

Please sign in to comment.