-
Notifications
You must be signed in to change notification settings - Fork 655
Add Firebase AI KSP Processor #7523
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
base: main
Are you sure you want to change the base?
Changes from 2 commits
2b57549
8643046
811122b
0d5d3f7
e7a1ab8
54e9466
368c2ec
bf2aa4d
94a2e45
d7ff3d4
da74532
534022a
d32ec1f
8624f43
334f3a3
8ffa303
74eece1
23969d5
5de85e9
b9a59d3
fb93399
a6493b1
67d3c26
45a26e8
fe5255a
db689c4
fe0b47b
eaf7671
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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") | ||
| } | ||
davidmotson marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ``` | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| /* | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The whole build file is using a different approach than what the other Firebase Libraries use (e.g. publishing config) Please update
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's because its not an android SDK, but a gradle plugin, I'm unsure if our existing structure would support it well. Similar to our conversations with crashlytics about moving their plugins into the repo, I think its best if this does not use the Firebase Libraries plugin |
||
| * 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() | ||
| } | ||
| } | ||
| 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() | ||
davidmotson marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| 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 = "", | ||
| ) |
Uh oh!
There was an error while loading. Please reload this page.