Skip to content

Commit

Permalink
feat: 分离apt注解为单独一个库,之前本来和apt 注解处理器一起的,通过gradle exclude方式也可以,不过仍然不太合适
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuozp committed Mar 21, 2020
1 parent ec9abb9 commit b1844c1
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ dependencies {

implementation project(":etc")
annotationProcessor project(':apt')
implementation project(":apt")
implementation project(":apt_annotation")

implementation "androidx.recyclerview:recyclerview:1.0.0"
}
1 change: 1 addition & 0 deletions app/src/main/java/com/gibbon/etc/demo/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.activity_main);
textView = findViewById(R.id.text);
textView.setOnClickListener(new View.OnClickListener() {

@ClickThrottle(value = 5000)
@Override
public void onClick(View v) {
Expand Down
1 change: 1 addition & 0 deletions apt/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ dependencies {
api 'com.google.auto.service:auto-service:1.0-rc6'
annotationProcessor 'com.google.auto.service:auto-service:1.0-rc6'
implementation 'com.squareup:javapoet:1.8.0'
implementation project(":apt_annotation")
}

sourceCompatibility = "7"
Expand Down
1 change: 1 addition & 0 deletions apt_annotation/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
8 changes: 8 additions & 0 deletions apt_annotation/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apply plugin: 'java-library'

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
}

sourceCompatibility = "7"
targetCompatibility = "7"
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
include ':app', ':etc', ':apt'
include ':app', ':etc', ':apt', ':apt_annotation'
rootProject.name='etcDemo'

0 comments on commit b1844c1

Please sign in to comment.