Skip to content
This repository was archived by the owner on Mar 10, 2025. It is now read-only.
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: 1 addition & 1 deletion .idea/copyright/Google.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions app-catalog/samples/subfolder/first/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

apply from: "$rootDir/gradle/sample-build.gradle"

android {
namespace 'com.google.android.catalog.app.compose'
}

dependencies {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.google.android.catalog.app.compose

import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import com.google.android.catalog.framework.annotations.Sample

@Sample(
name = "Sub-sample First",
description = "Shows how to use subfolders in the catalog",
documentation = "https://github.com/google/casa-android#create-sample-modules"
)
@Composable
fun SubfolderFirstSample() {
Box(Modifier.fillMaxSize(), contentAlignment = Alignment.Center) {
Text(text = "Hi, I am the First sample in the subfolder")
}
}
23 changes: 23 additions & 0 deletions app-catalog/samples/subfolder/second/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

apply from: "$rootDir/gradle/sample-build.gradle"

android {
namespace 'com.google.android.catalog.app.compose'
}

dependencies {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.google.android.catalog.app.compose

import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import com.google.android.catalog.framework.annotations.Sample

@Sample(
name = "Sub-sample Second",
description = "Shows how to use subfolders in the catalog",
documentation = "https://github.com/google/casa-android#create-sample-modules"
)
@Composable
fun SubfolderSecondSample() {
Box(Modifier.fillMaxSize(), contentAlignment = Alignment.Center) {
Text(text = "Hi, I am the second sample in the subfolder")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ internal fun CatalogScreen(
catalogSamples.filter { sample ->
if (searchTerm.isBlank()) {
selectedFilters.isEmpty() ||
selectedFilters.contains(sample.path) ||
selectedFilters.any { sample.path.contains(it) } ||
sample.tags.any { selectedFilters.contains(it) }
} else {
sample.name.contains(searchTerm, ignoreCase = true) ||
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ systemProp.org.gradle.internal.publish.checksums.insecure=true
systemProp.org.gradle.internal.http.socketTimeout=120000

GROUP=com.google.android.catalog.framework
VERSION_NAME=0.4.0-SNAPSHOT
VERSION_NAME=0.3.3

POM_DESCRIPTION=A framework to build catalog samples

Expand Down