Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate code to have an API that provides module level metadata of Showkase elements #392

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// This is an auto-generated file. Please do not edit/modify this file.This is an auto-generated file. Please do not edit/modify this file.
import com.airbnb.android.showkase.models.Showkase
import com.airbnb.android.showkase.models.ShowkaseElementsMetadata
import com.airbnb.android.showkase.models.ShowkaseProvider

/**
* Helper function that gives you access to Showkase elements that are declared in a given module.
* This contains data about the composables, colors and typography that are meant to be rendered inside
* the Showkase browser. This is different from the Showkase.getMetadata() function, which contains all
* the Showkase elements in a given ShowkaseRoot graph, whereas this function only contains metadata
* about the module it's generated in. Each module where Showkase is setup will have this function
* generated in it.
*/
public fun Showkase.getModuleMetadata(): ShowkaseElementsMetadata = (ShowkaseModuleMetadata_() as
ShowkaseProvider).metadata()
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// This is an auto-generated file. Please do not edit/modify this file.This is an auto-generated file. Please do not edit/modify this file.
import com.airbnb.android.showkase.models.ShowkaseBrowserColor
import com.airbnb.android.showkase.models.ShowkaseBrowserComponent
import com.airbnb.android.showkase.models.ShowkaseBrowserTypography
import com.airbnb.android.showkase.models.ShowkaseProvider
import kotlin.collections.List

public class ShowkaseModuleMetadata_ : ShowkaseProvider {
override fun getShowkaseComponents(): List<ShowkaseBrowserComponent> {

return listOf<ShowkaseBrowserComponent>(
TestComposable1group1name1,
TestComposable2group2name2,
)
}

override fun getShowkaseColors(): List<ShowkaseBrowserColor> {

return listOf<ShowkaseBrowserColor>(
redcolorname,
)
}

override fun getShowkaseTypography(): List<ShowkaseBrowserTypography> {

return listOf<ShowkaseBrowserTypography>(
titletypographyname,
)
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This is an auto-generated file. Please do not edit/modify this file.
// This is an auto-generated file. Please do not edit/modify this file.This is an auto-generated file. Please do not edit/modify this file.
import com.airbnb.android.showkase.`annotation`.ShowkaseRootCodegen
import com.airbnb.android.showkase.models.ShowkaseBrowserColor
import com.airbnb.android.showkase.models.ShowkaseBrowserComponent
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// This is an auto-generated file. Please do not edit/modify this file.This is an auto-generated file. Please do not edit/modify this file.
package com.airbnb.android.showkase_processor_testing

import com.airbnb.android.showkase.models.Showkase
import com.airbnb.android.showkase.models.ShowkaseElementsMetadata
import com.airbnb.android.showkase.models.ShowkaseProvider

/**
* Helper function that gives you access to Showkase elements that are declared in a given module.
* This contains data about the composables, colors and typography that are meant to be rendered inside
* the Showkase browser. This is different from the Showkase.getMetadata() function, which contains all
* the Showkase elements in a given ShowkaseRoot graph, whereas this function only contains metadata
* about the module it's generated in. Each module where Showkase is setup will have this function
* generated in it.
*/
public fun Showkase.getModuleMetadata(): ShowkaseElementsMetadata =
(ShowkaseModuleMetadata_com_airbnb_android_showkase_processor_testing() as
ShowkaseProvider).metadata()
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// This is an auto-generated file. Please do not edit/modify this file.This is an auto-generated file. Please do not edit/modify this file.
package com.airbnb.android.showkase_processor_testing

import com.airbnb.android.showkase.models.ShowkaseBrowserColor
import com.airbnb.android.showkase.models.ShowkaseBrowserComponent
import com.airbnb.android.showkase.models.ShowkaseBrowserTypography
import com.airbnb.android.showkase.models.ShowkaseProvider
import kotlin.collections.List

public class ShowkaseModuleMetadata_com_airbnb_android_showkase_processor_testing : ShowkaseProvider
{
override fun getShowkaseComponents(): List<ShowkaseBrowserComponent> {

return listOf<ShowkaseBrowserComponent>(
TestComposable1group1name1,
TestComposable2group2name2,
)
}

override fun getShowkaseColors(): List<ShowkaseBrowserColor> {

return listOf<ShowkaseBrowserColor>(
redcolorname,
)
}

override fun getShowkaseTypography(): List<ShowkaseBrowserTypography> {

return listOf<ShowkaseBrowserTypography>(
titletypographyname,
)
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This is an auto-generated file. Please do not edit/modify this file.
// This is an auto-generated file. Please do not edit/modify this file.This is an auto-generated file. Please do not edit/modify this file.
package com.airbnb.android.showkase_processor_testing

import com.airbnb.android.showkase.`annotation`.ShowkaseRootCodegen
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// This is an auto-generated file. Please do not edit/modify this file.This is an auto-generated file. Please do not edit/modify this file.
package com.airbnb.android.showkase_processor_testing

import com.airbnb.android.showkase.models.Showkase
import com.airbnb.android.showkase.models.ShowkaseElementsMetadata
import com.airbnb.android.showkase.models.ShowkaseProvider

/**
* Helper function that gives you access to Showkase elements that are declared in a given module.
* This contains data about the composables, colors and typography that are meant to be rendered inside
* the Showkase browser. This is different from the Showkase.getMetadata() function, which contains all
* the Showkase elements in a given ShowkaseRoot graph, whereas this function only contains metadata
* about the module it's generated in. Each module where Showkase is setup will have this function
* generated in it.
*/
public fun Showkase.getModuleMetadata(): ShowkaseElementsMetadata =
(ShowkaseModuleMetadata_com_airbnb_android_showkase_processor_testing() as
ShowkaseProvider).metadata()
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// This is an auto-generated file. Please do not edit/modify this file.This is an auto-generated file. Please do not edit/modify this file.
package com.airbnb.android.showkase_processor_testing

import com.airbnb.android.showkase.models.ShowkaseBrowserColor
import com.airbnb.android.showkase.models.ShowkaseBrowserComponent
import com.airbnb.android.showkase.models.ShowkaseBrowserTypography
import com.airbnb.android.showkase.models.ShowkaseProvider
import kotlin.collections.List

public class ShowkaseModuleMetadata_com_airbnb_android_showkase_processor_testing : ShowkaseProvider
{
override fun getShowkaseComponents(): List<ShowkaseBrowserComponent> {

return mutableListOf<ShowkaseBrowserComponent>(
TestComposable1WrapperClassTestComposable1,
).apply {
addAll(TestComposable2DefaultGroupTestComposable2)
}
}

override fun getShowkaseColors(): List<ShowkaseBrowserColor> {

return listOf<ShowkaseBrowserColor>(
)
}

override fun getShowkaseTypography(): List<ShowkaseBrowserTypography> {

return listOf<ShowkaseBrowserTypography>(
)
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This is an auto-generated file. Please do not edit/modify this file.
// This is an auto-generated file. Please do not edit/modify this file.This is an auto-generated file. Please do not edit/modify this file.
package com.airbnb.android.showkase_processor_testing

import com.airbnb.android.showkase.`annotation`.ShowkaseRootCodegen
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// This is an auto-generated file. Please do not edit/modify this file.This is an auto-generated file. Please do not edit/modify this file.
package com.airbnb.android.showkase_processor_testing

import com.airbnb.android.showkase.models.Showkase
import com.airbnb.android.showkase.models.ShowkaseElementsMetadata
import com.airbnb.android.showkase.models.ShowkaseProvider

/**
* Helper function that gives you access to Showkase elements that are declared in a given module.
* This contains data about the composables, colors and typography that are meant to be rendered inside
* the Showkase browser. This is different from the Showkase.getMetadata() function, which contains all
* the Showkase elements in a given ShowkaseRoot graph, whereas this function only contains metadata
* about the module it's generated in. Each module where Showkase is setup will have this function
* generated in it.
*/
public fun Showkase.getModuleMetadata(): ShowkaseElementsMetadata =
(ShowkaseModuleMetadata_com_airbnb_android_showkase_processor_testing() as
ShowkaseProvider).metadata()
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// This is an auto-generated file. Please do not edit/modify this file.This is an auto-generated file. Please do not edit/modify this file.
package com.airbnb.android.showkase_processor_testing

import com.airbnb.android.showkase.models.ShowkaseBrowserColor
import com.airbnb.android.showkase.models.ShowkaseBrowserComponent
import com.airbnb.android.showkase.models.ShowkaseBrowserTypography
import com.airbnb.android.showkase.models.ShowkaseProvider
import kotlin.collections.List

public class ShowkaseModuleMetadata_com_airbnb_android_showkase_processor_testing : ShowkaseProvider
{
override fun getShowkaseComponents(): List<ShowkaseBrowserComponent> {

return listOf<ShowkaseBrowserComponent>(
)
}

override fun getShowkaseColors(): List<ShowkaseBrowserColor> {

return listOf<ShowkaseBrowserColor>(
colorgroupname,
)
}

override fun getShowkaseTypography(): List<ShowkaseBrowserTypography> {

return listOf<ShowkaseBrowserTypography>(
)
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This is an auto-generated file. Please do not edit/modify this file.
// This is an auto-generated file. Please do not edit/modify this file.This is an auto-generated file. Please do not edit/modify this file.
package com.airbnb.android.showkase_processor_testing

import com.airbnb.android.showkase.`annotation`.ShowkaseRootCodegen
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// This is an auto-generated file. Please do not edit/modify this file.This is an auto-generated file. Please do not edit/modify this file.
package com.airbnb.android.showkase_processor_testing

import com.airbnb.android.showkase.models.Showkase
import com.airbnb.android.showkase.models.ShowkaseElementsMetadata
import com.airbnb.android.showkase.models.ShowkaseProvider

/**
* Helper function that gives you access to Showkase elements that are declared in a given module.
* This contains data about the composables, colors and typography that are meant to be rendered inside
* the Showkase browser. This is different from the Showkase.getMetadata() function, which contains all
* the Showkase elements in a given ShowkaseRoot graph, whereas this function only contains metadata
* about the module it's generated in. Each module where Showkase is setup will have this function
* generated in it.
*/
public fun Showkase.getModuleMetadata(): ShowkaseElementsMetadata =
(ShowkaseModuleMetadata_com_airbnb_android_showkase_processor_testing() as
ShowkaseProvider).metadata()
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// This is an auto-generated file. Please do not edit/modify this file.This is an auto-generated file. Please do not edit/modify this file.
package com.airbnb.android.showkase_processor_testing

import com.airbnb.android.showkase.models.ShowkaseBrowserColor
import com.airbnb.android.showkase.models.ShowkaseBrowserComponent
import com.airbnb.android.showkase.models.ShowkaseBrowserTypography
import com.airbnb.android.showkase.models.ShowkaseProvider
import kotlin.collections.List

public class ShowkaseModuleMetadata_com_airbnb_android_showkase_processor_testing : ShowkaseProvider
{
override fun getShowkaseComponents(): List<ShowkaseBrowserComponent> {

return listOf<ShowkaseBrowserComponent>(
)
}

override fun getShowkaseColors(): List<ShowkaseBrowserColor> {

return listOf<ShowkaseBrowserColor>(
colorWrapperClassname,
)
}

override fun getShowkaseTypography(): List<ShowkaseBrowserTypography> {

return listOf<ShowkaseBrowserTypography>(
)
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This is an auto-generated file. Please do not edit/modify this file.
// This is an auto-generated file. Please do not edit/modify this file.This is an auto-generated file. Please do not edit/modify this file.
package com.airbnb.android.showkase_processor_testing

import com.airbnb.android.showkase.`annotation`.ShowkaseRootCodegen
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// This is an auto-generated file. Please do not edit/modify this file.This is an auto-generated file. Please do not edit/modify this file.
package com.airbnb.android.showkase_processor_testing

import com.airbnb.android.showkase.models.Showkase
import com.airbnb.android.showkase.models.ShowkaseElementsMetadata
import com.airbnb.android.showkase.models.ShowkaseProvider

/**
* Helper function that gives you access to Showkase elements that are declared in a given module.
* This contains data about the composables, colors and typography that are meant to be rendered inside
* the Showkase browser. This is different from the Showkase.getMetadata() function, which contains all
* the Showkase elements in a given ShowkaseRoot graph, whereas this function only contains metadata
* about the module it's generated in. Each module where Showkase is setup will have this function
* generated in it.
*/
public fun Showkase.getModuleMetadata(): ShowkaseElementsMetadata =
(ShowkaseModuleMetadata_com_airbnb_android_showkase_processor_testing() as
ShowkaseProvider).metadata()
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// This is an auto-generated file. Please do not edit/modify this file.This is an auto-generated file. Please do not edit/modify this file.
package com.airbnb.android.showkase_processor_testing

import com.airbnb.android.showkase.models.ShowkaseBrowserColor
import com.airbnb.android.showkase.models.ShowkaseBrowserComponent
import com.airbnb.android.showkase.models.ShowkaseBrowserTypography
import com.airbnb.android.showkase.models.ShowkaseProvider
import kotlin.collections.List

public class ShowkaseModuleMetadata_com_airbnb_android_showkase_processor_testing : ShowkaseProvider
{
override fun getShowkaseComponents(): List<ShowkaseBrowserComponent> {

return listOf<ShowkaseBrowserComponent>(
)
}

override fun getShowkaseColors(): List<ShowkaseBrowserColor> {

return listOf<ShowkaseBrowserColor>(
colorgroupname,
)
}

override fun getShowkaseTypography(): List<ShowkaseBrowserTypography> {

return listOf<ShowkaseBrowserTypography>(
)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// This is an auto-generated file. Please do not edit/modify this file.This is an auto-generated file. Please do not edit/modify this file.
package com.airbnb.android.showkase_processor_testing

import com.airbnb.android.showkase.models.Showkase
import com.airbnb.android.showkase.models.ShowkaseElementsMetadata
import com.airbnb.android.showkase.models.ShowkaseProvider

/**
* Helper function that gives you access to Showkase elements that are declared in a given module.
* This contains data about the composables, colors and typography that are meant to be rendered inside
* the Showkase browser. This is different from the Showkase.getMetadata() function, which contains all
* the Showkase elements in a given ShowkaseRoot graph, whereas this function only contains metadata
* about the module it's generated in. Each module where Showkase is setup will have this function
* generated in it.
*/
public fun Showkase.getModuleMetadata(): ShowkaseElementsMetadata =
(ShowkaseModuleMetadata_com_airbnb_android_showkase_processor_testing() as
ShowkaseProvider).metadata()
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// This is an auto-generated file. Please do not edit/modify this file.This is an auto-generated file. Please do not edit/modify this file.
package com.airbnb.android.showkase_processor_testing

import com.airbnb.android.showkase.models.ShowkaseBrowserColor
import com.airbnb.android.showkase.models.ShowkaseBrowserComponent
import com.airbnb.android.showkase.models.ShowkaseBrowserTypography
import com.airbnb.android.showkase.models.ShowkaseProvider
import kotlin.collections.List

public class ShowkaseModuleMetadata_com_airbnb_android_showkase_processor_testing : ShowkaseProvider
{
override fun getShowkaseComponents(): List<ShowkaseBrowserComponent> {

return listOf<ShowkaseBrowserComponent>(
)
}

override fun getShowkaseColors(): List<ShowkaseBrowserColor> {

return listOf<ShowkaseBrowserColor>(
colorgroupname,
)
}

override fun getShowkaseTypography(): List<ShowkaseBrowserTypography> {

return listOf<ShowkaseBrowserTypography>(
)
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This is an auto-generated file. Please do not edit/modify this file.
// This is an auto-generated file. Please do not edit/modify this file.This is an auto-generated file. Please do not edit/modify this file.
package com.airbnb.android.showkase_processor_testing

import com.airbnb.android.showkase.`annotation`.ShowkaseRootCodegen
Expand Down
Loading