Skip to content

Commit 8643046

Browse files
author
David Motsonashvili
committed
add the code
1 parent 2b57549 commit 8643046

File tree

8 files changed

+435
-0
lines changed

8 files changed

+435
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
To build run `./gradlew :publishToMavenLocal`
2+
3+
To integrate: add the following to your app's gradle file:
4+
5+
```declarative
6+
plugins {
7+
id("com.google.devtools.ksp")
8+
}
9+
dependencies {
10+
implementation("com.google.firebase:firebase-ai-ksp-processor:1.0.0")
11+
ksp("com.google.firebase:firebase-ai-ksp-processor:1.0.0")
12+
}
13+
```
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* Copyright 2025 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
plugins {
18+
kotlin("jvm")
19+
id("java-library")
20+
id("maven-publish")
21+
}
22+
23+
dependencies {
24+
testImplementation(kotlin("test"))
25+
implementation(libs.symbol.processing.api)
26+
implementation(libs.kotlinpoet.ksp)
27+
}
28+
29+
tasks.test { useJUnitPlatform() }
30+
31+
kotlin { jvmToolchain(21) }
32+
33+
publishing {
34+
publications {
35+
create<MavenPublication>("mavenKotlin") {
36+
from(components["kotlin"])
37+
groupId = "com.google.firebase"
38+
artifactId = "firebase-ai-ksp-processor"
39+
version = "1.0.0"
40+
}
41+
}
42+
repositories {
43+
maven { url = uri("m2/") }
44+
mavenLocal()
45+
}
46+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
kotlin.code.style=official
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Copyright 2025 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.google.firebase.ai.annotations
18+
19+
@Target(AnnotationTarget.CLASS)
20+
@Retention(AnnotationRetention.SOURCE)
21+
public annotation class Generable()
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* Copyright 2025 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.google.firebase.ai.annotations
18+
19+
@Target(AnnotationTarget.CLASS, AnnotationTarget.PROPERTY)
20+
@Retention(AnnotationRetention.SOURCE)
21+
public annotation class Guide(
22+
public val description: String = "",
23+
public val minimum: Double = -1.0,
24+
public val maximum: Double = -1.0,
25+
public val minItems: Int = -1,
26+
public val maxItems: Int = -1,
27+
public val format: String = "",
28+
)

0 commit comments

Comments
 (0)