Skip to content
Open
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
69 changes: 69 additions & 0 deletions ai/sample/core-proto/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/*
* Copyright 2026 The Android Open Source Project
*
* 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.
*/

plugins {
id("java-library")
id("com.google.protobuf")
}

java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

protobuf {
protoc {
artifact = libs.protobuf.protoc.stnd.get().toString()
}
plugins {
create("javalite") {
artifact = libs.protobuf.protoc.gen.javalite.get().toString()
}
create("grpc") {
artifact = libs.protobuf.protoc.gen.grpc.java.get().toString()
}
create("grpckt") {
artifact = libs.protobuf.protoc.gen.grpc.kotlin.get().toString()
}
}
generateProtoTasks {
all().forEach { task ->
task.builtins {
named("java") {
option("lite")
}
create("kotlin") {
option("lite")
}
}
task.plugins {
create("grpc") {
option("lite")
}
create("grpckt") {
option("lite")
}
}
}
}
}

dependencies {
api(libs.protobuf.kotlin.lite)
api(libs.io.grpc.protobuf.lite)
api(libs.io.grpc.grpc.kotlin)
api(libs.grpc.stub)
}
49 changes: 2 additions & 47 deletions ai/sample/core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

plugins {
id("com.android.library")
id("com.google.protobuf")
kotlin("android")

id("com.google.devtools.ksp")
id("dagger.hilt.android.plugin")
}
Expand All @@ -40,14 +39,6 @@ android {
buildConfig = false
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.majorVersion
freeCompilerArgs = freeCompilerArgs +
listOf(
"-opt-in=kotlin.RequiresOptIn",
"-opt-in=com.google.android.horologist.annotations.ExperimentalHorologistApi",
)
}
packaging {
resources {
excludes +=
Expand All @@ -72,45 +63,9 @@ android {
namespace = "com.google.android.horologist.ai.sample.core"
}

protobuf {
protoc {
artifact = libs.protobuf.protoc.stnd.get().toString()
}
plugins {
create("javalite") {
artifact = libs.protobuf.protoc.gen.javalite.get().toString()
}
create("grpc") {
artifact = libs.protobuf.protoc.gen.grpc.java.get().toString()
}
create("grpckt") {
artifact = libs.protobuf.protoc.gen.grpc.kotlin.get().toString()
}
}
generateProtoTasks {
all().forEach { task ->
task.builtins {
create("java") {
option("lite")
}
create("kotlin") {
option("lite")
}
}
task.plugins {
create("grpc") {
option("lite")
}
create("grpckt") {
option("lite")
}
}
}
}
}

dependencies {
api(projects.annotations)
api(projects.ai.sample.coreProto)

implementation(libs.dagger.hiltandroid)
implementation(projects.datalayer.core)
Expand Down
11 changes: 0 additions & 11 deletions ai/sample/phone/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

plugins {
id("com.android.application")
kotlin("android")
id("com.google.devtools.ksp")
id("dagger.hilt.android.plugin")
kotlin("plugin.serialization")
Expand Down Expand Up @@ -61,16 +60,6 @@ android {
targetCompatibility = JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.majorVersion

// Allow for widescale experimental APIs in Alpha libraries we build upon
freeCompilerArgs = freeCompilerArgs +
listOf(
"-opt-in=com.google.android.horologist.annotations.ExperimentalHorologistApi",
)
}

packaging {
resources {
excludes +=
Expand Down
9 changes: 0 additions & 9 deletions ai/sample/wear-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

plugins {
id("com.android.library")
kotlin("android")
id("com.google.devtools.ksp")
id("dagger.hilt.android.plugin")
}
Expand All @@ -39,14 +38,6 @@ android {
buildConfig = false
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.majorVersion
freeCompilerArgs = freeCompilerArgs +
listOf(
"-opt-in=kotlin.RequiresOptIn",
"-opt-in=com.google.android.horologist.annotations.ExperimentalHorologistApi",
)
}
packaging {
resources {
excludes +=
Expand Down
19 changes: 7 additions & 12 deletions ai/sample/wear-gemini-lib/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import java.util.Properties

plugins {
id("com.android.library")
kotlin("android")
id("org.jetbrains.kotlin.plugin.serialization")
}

Expand Down Expand Up @@ -68,7 +67,13 @@ android {
buildConfigField(
"String",
"GEMINI_PROXY",
if (localProperties.containsKey("gemini.apk.proxy")) "\"" + localProperties["gemini.apk.proxy"] + "\"" else "null",
if (localProperties.containsKey("gemini.apk.proxy")) {
"\"" +
localProperties["gemini.apk.proxy"] +
"\""
} else {
"null"
},
)
}

Expand All @@ -81,16 +86,6 @@ android {
buildConfig = true
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.majorVersion

// Allow for widescale experimental APIs in Alpha libraries we build upon
freeCompilerArgs = freeCompilerArgs +
listOf(
"-opt-in=com.google.android.horologist.annotations.ExperimentalHorologistApi",
)
}

testOptions {
unitTests {
isIncludeAndroidResources = true
Expand Down
11 changes: 0 additions & 11 deletions ai/sample/wear-gemini/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import java.util.Properties

plugins {
id("com.android.application")
kotlin("android")
id("com.google.devtools.ksp")
id("dagger.hilt.android.plugin")
id("org.jetbrains.kotlin.plugin.serialization")
Expand Down Expand Up @@ -87,16 +86,6 @@ android {
buildConfig = true
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.majorVersion

// Allow for widescale experimental APIs in Alpha libraries we build upon
freeCompilerArgs = freeCompilerArgs +
listOf(
"-opt-in=com.google.android.horologist.annotations.ExperimentalHorologistApi",
)
}

testOptions {
unitTests {
isIncludeAndroidResources = true
Expand Down
11 changes: 0 additions & 11 deletions ai/sample/wear-prompt-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

plugins {
id("com.android.application")
kotlin("android")
id("com.google.devtools.ksp")
id("dagger.hilt.android.plugin")
kotlin("plugin.serialization")
Expand Down Expand Up @@ -64,16 +63,6 @@ android {
buildConfig = true
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.majorVersion

// Allow for widescale experimental APIs in Alpha libraries we build upon
freeCompilerArgs = freeCompilerArgs +
listOf(
"-opt-in=com.google.android.horologist.annotations.ExperimentalHorologistApi",
)
}

packaging {
resources {
excludes +=
Expand Down
15 changes: 0 additions & 15 deletions ai/ui/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ plugins {
id("com.android.library")
alias(libs.plugins.dokka)
alias(libs.plugins.metalavaGradle)
kotlin("android")
alias(libs.plugins.roborazzi)
alias(libs.plugins.compose.compiler)
}
Expand All @@ -41,12 +40,6 @@ android {
buildConfig = false
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.majorVersion
freeCompilerArgs = freeCompilerArgs + "-opt-in=kotlin.RequiresOptIn"
freeCompilerArgs = freeCompilerArgs + "-opt-in=com.google.android.horologist.annotations.ExperimentalHorologistApi"
}

packaging {
resources {
excludes +=
Expand Down Expand Up @@ -116,12 +109,4 @@ dependencies {
testImplementation(libs.truth)
}

tasks.withType<org.jetbrains.dokka.gradle.DokkaTaskPartial>().configureEach {
dokkaSourceSets {
configureEach {
moduleName.set("ai-ui")
}
}
}

apply(plugin = "com.vanniktech.maven.publish")
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 0 additions & 16 deletions auth/composables-material3/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ plugins {
alias(libs.plugins.dokka)
alias(libs.plugins.metalavaGradle)
alias(libs.plugins.dependencyAnalysis)
kotlin("android")
alias(libs.plugins.roborazzi)
alias(libs.plugins.compose.compiler)
}
Expand All @@ -42,13 +41,6 @@ android {
buildConfig = false
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.majorVersion
freeCompilerArgs += listOf(
"-opt-in=com.google.android.horologist.annotations.ExperimentalHorologistApi",
)
}

packaging {
resources {
excludes +=
Expand Down Expand Up @@ -130,12 +122,4 @@ dependencyAnalysis {
}
}

tasks.withType<org.jetbrains.dokka.gradle.DokkaTaskPartial>().configureEach {
dokkaSourceSets {
configureEach {
moduleName.set("auth-composables-material3")
}
}
}

apply(plugin = "com.vanniktech.maven.publish")
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 The Android Open Source Project
* Copyright 2022-2026 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -28,7 +28,6 @@ import androidx.compose.foundation.layout.size
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.AccountCircle
import androidx.compose.material.icons.outlined.AccountCircle
import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi
import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialShapes
import androidx.compose.material3.toShape
Expand Down Expand Up @@ -135,7 +134,6 @@ public fun SignedInConfirmationDialog(
)
}

@OptIn(ExperimentalMaterial3ExpressiveApi::class)
@Composable
internal fun SignedInConfirmationDialogContent(
modifier: Modifier = Modifier,
Expand Down Expand Up @@ -197,7 +195,7 @@ internal fun SignedInConfirmationDialogContent(
text = if (hasName) {
stringResource(
id = R.string.horologist_signedin_confirmation_greeting,
name!!,
name,
)
} else {
stringResource(id = R.string.horologist_signedin_confirmation_greeting_no_name)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading