-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce SlotTableInspector API for Compose.
- Loading branch information
1 parent
29d788d
commit f75d8c8
Showing
9 changed files
with
716 additions
and
63 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | ||
|
||
plugins { | ||
id("com.android.library") | ||
kotlin("android") | ||
id("com.vanniktech.maven.publish") | ||
} | ||
|
||
android { | ||
compileSdk = 30 | ||
|
||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
} | ||
|
||
defaultConfig { | ||
// Compose minSdk is also 21. | ||
minSdk = 21 | ||
targetSdk = 30 | ||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | ||
} | ||
|
||
buildFeatures { | ||
buildConfig = false | ||
compose = true | ||
} | ||
|
||
composeOptions { | ||
kotlinCompilerExtensionVersion = Versions.Compose | ||
} | ||
|
||
testOptions { | ||
execution = "ANDROIDX_TEST_ORCHESTRATOR" | ||
} | ||
} | ||
|
||
tasks.withType<KotlinCompile> { | ||
kotlinOptions { | ||
freeCompilerArgs += listOfNotNull( | ||
"-Xopt-in=kotlin.RequiresOptIn", | ||
|
||
// Require explicit public modifiers and types. | ||
// TODO this should be moved to a top-level `kotlin { explicitApi() }` once that's working | ||
// for android projects, see https://youtrack.jetbrains.com/issue/KT-37652. | ||
"-Xexplicit-api=strict".takeUnless { | ||
// Tests aren't part of the public API, don't turn explicit API mode on for them. | ||
name.contains("test", ignoreCase = true) | ||
} | ||
) | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation(Dependencies.Compose().Material) | ||
// implementation(Dependencies.Compose().ToolingData) | ||
implementation(Dependencies.Compose().Tooling) | ||
|
||
testImplementation(Dependencies.JUnit) | ||
testImplementation(Dependencies.Mockito) | ||
testImplementation(Dependencies.Robolectric) | ||
testImplementation(Dependencies.Truth) | ||
|
||
androidTestImplementation(Dependencies.Compose().Testing) | ||
androidTestImplementation(Dependencies.InstrumentationTests.Core) | ||
androidTestImplementation(Dependencies.InstrumentationTests.Espresso) | ||
androidTestImplementation(Dependencies.InstrumentationTests.Rules) | ||
androidTestImplementation(Dependencies.InstrumentationTests.Runner) | ||
androidTestImplementation(Dependencies.Truth) | ||
androidTestUtil(Dependencies.InstrumentationTests.Orchestrator) | ||
} |
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,3 @@ | ||
POM_ARTIFACT_ID=slot-table-inspector | ||
POM_NAME=Radiography slot table inspector | ||
POM_PACKAGING=aar |
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,15 @@ | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.squareup.radiography.compose.slottable.test"> | ||
|
||
<!-- | ||
Workaround required for running tests on API 30 devices. | ||
See https://github.com/android/android-test/issues/743. | ||
Version 1.3.1 of the AndroidX Test libraries remove the need for this workaround. | ||
--> | ||
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" /> | ||
|
||
<application> | ||
<activity android:name="androidx.activity.ComponentActivity" /> | ||
</application> | ||
</manifest> | ||
|
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 @@ | ||
<manifest package="com.squareup.radiography.compose.slottable"/> |
Oops, something went wrong.