Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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
13 changes: 13 additions & 0 deletions firebase-ai-ksp-processor/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
To build run `./gradlew :publishToMavenLocal`

To integrate: add the following to your app's gradle file:

```declarative
plugins {
id("com.google.devtools.ksp")
}
dependencies {
implementation("com.google.firebase:firebase-ai-ksp-processor:1.0.0")
ksp("com.google.firebase:firebase-ai-ksp-processor:1.0.0")
}
```
46 changes: 46 additions & 0 deletions firebase-ai-ksp-processor/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* Copyright 2025 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
*
* http://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 {
kotlin("jvm")
id("java-library")
id("maven-publish")
}

dependencies {
testImplementation(kotlin("test"))
implementation(libs.symbol.processing.api)
implementation(libs.kotlinpoet.ksp)
}

tasks.test { useJUnitPlatform() }

kotlin { jvmToolchain(21) }

publishing {
publications {
create<MavenPublication>("mavenKotlin") {
from(components["kotlin"])
groupId = "com.google.firebase"
artifactId = "firebase-ai-ksp-processor"
version = "1.0.0"
}
}
repositories {
maven { url = uri("m2/") }
mavenLocal()
}
}
1 change: 1 addition & 0 deletions firebase-ai-ksp-processor/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
kotlin.code.style=official
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* Copyright 2025 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
*
* http://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.firebase.ai.annotations

@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.SOURCE)
public annotation class Generable()
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Copyright 2025 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
*
* http://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.firebase.ai.annotations

@Target(AnnotationTarget.CLASS, AnnotationTarget.PROPERTY)
@Retention(AnnotationRetention.SOURCE)
public annotation class Guide(
public val description: String = "",
public val minimum: Double = -1.0,
public val maximum: Double = -1.0,
public val minItems: Int = -1,
public val maxItems: Int = -1,
public val format: String = "",
)
Loading
Loading