-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from cashapp/jw.android.2024-10-18
Add support for Kotlin Android plugin
- Loading branch information
Showing
13 changed files
with
185 additions
and
14 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
38 changes: 38 additions & 0 deletions
38
burst-gradle-plugin/src/test/projects/android/build.gradle.kts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget | ||
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile | ||
|
||
buildscript { | ||
repositories { | ||
maven { | ||
url = file("$rootDir/../../../../../build/testMaven").toURI() | ||
} | ||
mavenCentral() | ||
google() | ||
} | ||
dependencies { | ||
classpath("app.cash.burst:burst-gradle-plugin:${project.property("burstVersion")}") | ||
classpath(libs.android.gradlePlugin) | ||
classpath(libs.kotlin.gradlePlugin) | ||
} | ||
} | ||
|
||
allprojects { | ||
repositories { | ||
maven { | ||
url = file("$rootDir/../../../../../build/testMaven").toURI() | ||
} | ||
mavenCentral() | ||
google() | ||
} | ||
|
||
tasks.withType(JavaCompile::class.java).configureEach { | ||
sourceCompatibility = "1.8" | ||
targetCompatibility = "1.8" | ||
} | ||
|
||
tasks.withType(KotlinJvmCompile::class.java).configureEach { | ||
compilerOptions { | ||
jvmTarget.set(JvmTarget.JVM_1_8) | ||
} | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
burst-gradle-plugin/src/test/projects/android/lib/build.gradle.kts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
plugins { | ||
id("com.android.library") | ||
kotlin("android") | ||
id("app.cash.burst") | ||
} | ||
|
||
android { | ||
namespace = "com.example" | ||
compileSdk = 35 | ||
|
||
defaultConfig { | ||
minSdk = 21 | ||
} | ||
} | ||
|
||
dependencies { | ||
testImplementation(libs.kotlin.test) | ||
androidTestImplementation(libs.kotlin.test) | ||
} |
22 changes: 22 additions & 0 deletions
22
...t-gradle-plugin/src/test/projects/android/lib/src/androidTest/kotlin/AndroidCoffeeTest.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import app.cash.burst.Burst | ||
import kotlin.test.BeforeTest | ||
import kotlin.test.Test | ||
|
||
@Burst | ||
class AndroidCoffeeTest( | ||
private val espresso: Espresso, | ||
) { | ||
@BeforeTest | ||
fun setUp() { | ||
println("set up $espresso") | ||
} | ||
|
||
@Test | ||
fun test(dairy: Dairy) { | ||
println("running $espresso $dairy") | ||
} | ||
} | ||
|
||
enum class Espresso { Decaf, Regular, Double } | ||
|
||
enum class Dairy { None, Milk, Oat } |
22 changes: 22 additions & 0 deletions
22
burst-gradle-plugin/src/test/projects/android/lib/src/test/kotlin/CoffeeTest.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import app.cash.burst.Burst | ||
import kotlin.test.BeforeTest | ||
import kotlin.test.Test | ||
|
||
@Burst | ||
class CoffeeTest( | ||
private val espresso: Espresso, | ||
) { | ||
@BeforeTest | ||
fun setUp() { | ||
println("set up $espresso") | ||
} | ||
|
||
@Test | ||
fun test(dairy: Dairy) { | ||
println("running $espresso $dairy") | ||
} | ||
} | ||
|
||
enum class Espresso { Decaf, Regular, Double } | ||
|
||
enum class Dairy { None, Milk, Oat } |
9 changes: 9 additions & 0 deletions
9
burst-gradle-plugin/src/test/projects/android/settings.gradle.kts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
dependencyResolutionManagement { | ||
versionCatalogs { | ||
create("libs") { | ||
from(files("../../../../../gradle/libs.versions.toml")) | ||
} | ||
} | ||
} | ||
|
||
include(":lib") |
This file contains 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
This file contains 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
This file contains 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
This file contains 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