Skip to content

Commit e52b0fe

Browse files
committed
[build] modularize the project by having one module for providing the annotaiton, while we have another providing the annotation processor
1 parent f6aaf8f commit e52b0fe

File tree

4 files changed

+26
-1
lines changed

4 files changed

+26
-1
lines changed

annotation/build.gradle.kts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
plugins {
2+
kotlin("jvm")
3+
}
4+
5+
group = "com.tobrun.datacompat"
6+
version = "1.0-SNAPSHOT"
7+
8+
repositories {
9+
mavenCentral()
10+
google()
11+
}
12+
13+
dependencies {
14+
implementation(kotlin("stdlib"))
15+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package com.tobrun.datacompat.annotation
2+
3+
/**
4+
* Annotation class of DataCompat.
5+
* Classes annotated with this annotation are required to be Kotlin data classes with private visibility.
6+
*/
7+
@Retention(AnnotationRetention.RUNTIME)
8+
@Target(AnnotationTarget.CLASS)
9+
annotation class DataCompat

example/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ repositories {
1010

1111
dependencies {
1212
implementation(kotlin("stdlib"))
13-
implementation(project(":processor"))
13+
implementation(project(":annotation"))
1414
ksp(project(":processor"))
1515
}
1616

settings.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@ pluginManagement {
1313

1414
rootProject.name = "data-compat"
1515

16+
include(":annotation")
1617
include(":processor")
1718
include(":example")

0 commit comments

Comments
 (0)