Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ While developing, you can build, run pre-commits, checks & tests on the plugin u

Make sure your tests are all green ✅ locally before submitting PRs.

NOTE: If you don't have the [Android SDK](https://developer.android.com/studio/releases/sdk-tools) you can skip the Android related tasks by setting `SKIP_ANDROID` enviromental variable (tests will be run on the CI anyway).

## Contributing/Support

Support for this project is offered in the [#swagger-gradle-codegen](https://kotlinlang.slack.com/archives/CU233PG2Z) channel on the Kotlinlang slack ([request an invite here](http://slack.kotlinlang.org/)).
Expand Down
13 changes: 1 addition & 12 deletions samples/junit-tests/build.gradle
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
plugins {
id("com.android.library")
id("kotlin-android")
id("kotlin")
id("com.yelp.codegen.plugin")
id("io.gitlab.arturbosch.detekt")
id("kotlin-kapt")
}

android {
compileSdkVersion = 28
defaultConfig {
minSdkVersion 21
targetSdkVersion 28
versionCode = 1
versionName = "1.0"
}
}

dependencies {
// Kotlin
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.70"
Expand Down
2 changes: 0 additions & 2 deletions samples/junit-tests/src/main/AndroidManifest.xml

This file was deleted.

23 changes: 20 additions & 3 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,27 @@ pluginManagement {
}
}

include(
":samples:junit-tests",
include(":samples:junit-tests")

if (shouldIncludeAndroidProjects()) {
include(
":samples:kotlin-android",
":samples:kotlin-coroutines",
":samples:groovy-android")
":samples:groovy-android"
)
}

includeBuild("gradle-plugin")

fun shouldIncludeAndroidProjects(): Boolean {
if (System.getenv("CI") != null) {
// Ensure that on CI systems we run all the gradle tasks (including the Android specific ones)
return true;
}

if (System.getenv("SKIP_ANDROID") != null) {
return false;
}

return true;
}