-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue with submodule components not showing up (#216)
* Fix issue * Added submodule to verify components are being pulled from all modules * Fix failing tests * Fix detekt issue * Remove unnecessary code
- Loading branch information
Showing
12 changed files
with
138 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
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,85 @@ | ||
apply plugin: 'com.android.library' | ||
apply plugin: 'kotlin-android' | ||
|
||
android { | ||
compileSdkVersion 31 | ||
// Added to avoid this error - | ||
// Execution failed for task ':showkase-processor-testing:mergeDebugAndroidTestJavaResource'. | ||
// > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade | ||
// > More than one file was found with OS independent path 'META-INF/gradle/incremental.annotation.processors' | ||
packagingOptions { | ||
exclude 'META-INF/gradle/incremental.annotation.processors' | ||
exclude("META-INF/*.kotlin_module") | ||
} | ||
defaultConfig { | ||
minSdkVersion 26 | ||
targetSdkVersion 30 | ||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | ||
// The following argument makes the Android Test Orchestrator run its | ||
// "pm clear" command after each test invocation. This command ensures | ||
// that the app's state is completely cleared between tests. | ||
testInstrumentationRunnerArguments clearPackageData: 'true' | ||
} | ||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_11 | ||
targetCompatibility JavaVersion.VERSION_11 | ||
} | ||
kotlinOptions { | ||
jvmTarget = '11' | ||
} | ||
buildFeatures { | ||
compose true | ||
} | ||
composeOptions { | ||
kotlinCompilerVersion "${versions.kotlinCompilerVersion}" | ||
kotlinCompilerExtensionVersion "${versions.compose}" | ||
} | ||
// Added to avoid this error - | ||
// Execution failed for task ':app:mergeDebugAndroidTestJavaResource'. | ||
// > A failure occurred while executing com.android.build.gradle.internal.tasks.MergeJavaResWorkAction | ||
// > 2 files found with path 'META-INF/AL2.0' from inputs: | ||
packagingOptions { | ||
exclude 'META-INF/AL2.0' | ||
exclude 'META-INF/LGPL2.1' | ||
} | ||
configurations { | ||
all { | ||
// work around this error: | ||
// Duplicate class org.intellij.lang.annotations.Identifier found in modules annotations-12.0 (com.intellij:annotations:12.0) and annotations-13.0 (org.jetbrains:annotations:13.0) | ||
exclude group: "com.intellij", module: "annotations" | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
// Support Libraries | ||
implementation deps.support.appCompat | ||
|
||
// Showkase | ||
implementation project(':showkase') | ||
if (project.hasProperty('useKsp')) { | ||
ksp project(':showkase-processor') | ||
} else { | ||
kapt project(':showkase-processor') | ||
} | ||
implementation project(':showkase-processor') | ||
implementation project(':showkase-screenshot-testing') | ||
|
||
// Compose | ||
implementation deps.compose.activityCompose | ||
implementation deps.compose.composeRuntime | ||
implementation deps.compose.core | ||
implementation deps.compose.foundation | ||
implementation deps.compose.tooling | ||
androidTestImplementation deps.compose.uiTest | ||
|
||
// Material | ||
implementation deps.material.material | ||
implementation deps.material.mdcComposeThemeAdapter | ||
|
||
// Testing | ||
androidTestImplementation deps.test.junitImplementation | ||
androidTestImplementation deps.test.androidXTestCore | ||
androidTestImplementation deps.test.androidXTestRules | ||
androidTestImplementation deps.test.androidxTestRunner | ||
} |
Empty file.
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,21 @@ | ||
# Add project specific ProGuard rules here. | ||
# You can control the set of applied configuration files using the | ||
# proguardFiles setting in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
|
||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
#-keepattributes SourceFile,LineNumberTable | ||
|
||
# If you keep the line number information, uncomment this to | ||
# hide the original source file name. | ||
#-renamesourcefileattribute SourceFile |
5 changes: 5 additions & 0 deletions
5
showkase-browser-testing-submodule/src/main/AndroidManifest.xml
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,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.vinaygaba.showkase_browser_testing_submodule"> | ||
|
||
</manifest> |
12 changes: 12 additions & 0 deletions
12
...rc/main/java/com/vinaygaba/showkase_browser_testing_submodule/SubmoduleTestComposables.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,12 @@ | ||
@file:Suppress("PackageNaming") | ||
package com.vinaygaba.showkase_browser_testing_submodule | ||
|
||
import androidx.compose.foundation.text.BasicText | ||
import androidx.compose.runtime.Composable | ||
import com.airbnb.android.showkase.annotation.ShowkaseComposable | ||
|
||
@ShowkaseComposable(name = "Submodule Component", group = "Submodule") | ||
@Composable | ||
fun SubmoduleComposable() { | ||
BasicText(text = "Submodule Component") | ||
} |
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
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