Skip to content

Commit

Permalink
Incremental annotation processor (#136)
Browse files Browse the repository at this point in the history
* Incremental annotation processor

* Fix annotation retention to class
  • Loading branch information
elihart authored May 22, 2020
1 parent 84577fe commit e674604
Show file tree
Hide file tree
Showing 117 changed files with 2,050 additions and 1,770 deletions.
495 changes: 245 additions & 250 deletions .idea/codeStyles/Project.xml

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.5.0 (May 20, 2020)

- Adds support for incremental annotation processing

# 1.4.0 (February 14, 2020)

- Added support for namespaced resources.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ Paris lets you define and apply styles programmatically to Android views, includ
In your project's `build.gradle`:
```gradle
dependencies {
implementation 'com.airbnb.android:paris:1.4.0'
implementation 'com.airbnb.android:paris:1.5.0'
// If you're using Paris annotations.
kapt 'com.airbnb.android:paris-processor:1.4.0'
kapt 'com.airbnb.android:paris-processor:1.5.0'
}
```

Expand Down
2 changes: 1 addition & 1 deletion RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ Releasing
1. Tag version `vX.Y.Z`
2. Release title `vX.Y.Z`
3. Paste the content from `CHANGELOG.md` as the description
7. `./gradlew clean uploadArchives`
7. `./gradlew clean uploadArchives --no-daemon --no-parallel`
8. Visit [Sonatype Nexus](https://oss.sonatype.org/) and promote the artifact.
17 changes: 10 additions & 7 deletions blessedDeps.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,24 @@ rootProject.ext {
ANDROIDX_APPCOMPAT_VERSION = '1.1.0'
ANDROIDX_CONSTRAINTLAYOUT_VERSION = '1.1.3'
ANDROIDX_ESPRESSO_VERSION = '3.1.0'
JAVAPOET_VERSION = '1.11.1'
JUNIT_VERSION = '4.12'
KOTLINPOET_VERSION = '1.0.0'
INCAP_VERSION = "0.2"
JAVAPOET_VERSION = '1.12.1'
JUNIT_VERSION = '4.13'
KOTLINPOET_VERSION = '1.5.0'
KOTLIN_TEST_VERSION = '2.0.7'
MOCKITO_VERSION = '2.23.0'
ROBOLECTRIC_VERSION = '3.8'
TESTING_COMPILE_VERSION = '0.15'
MOCKITO_VERSION = '3.3.3'
ROBOLECTRIC_VERSION = '4.3.1'
TESTING_COMPILE_VERSION = '0.18'

deps = [
// Keep these alphabetized
androidAnnotations: "androidx.annotation:annotation:$ANDROIDX_ANNOTATIONS_VERSION",
appcompat : "androidx.appcompat:appcompat:$ANDROIDX_APPCOMPAT_VERSION",
constraintLayout : "androidx.constraintlayout:constraintlayout:$ANDROIDX_CONSTRAINTLAYOUT_VERSION",
espresso : "androidx.test.espresso:espresso-core:$ANDROIDX_ESPRESSO_VERSION",
javaPoet : "com.squareup:javapoet:$JAVAPOET_VERSION",
espresso : "androidx.test.espresso:espresso-core:$ANDROIDX_ESPRESSO_VERSION",
incapRuntime : "net.ltgt.gradle.incap:incap:$INCAP_VERSION",
incapProcessor : "net.ltgt.gradle.incap:incap-processor:$INCAP_VERSION",
junit : "junit:junit:$JUNIT_VERSION",
kotlin : "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$KOTLIN_VERSION",
kotlinReflect : "org.jetbrains.kotlin:kotlin-reflect:$KOTLIN_VERSION",
Expand Down
9 changes: 5 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ apply plugin: "com.github.ben-manes.versions"

buildscript {
ext {
ANDROID_PLUGIN_VERSION = '3.3.0'
BUTTERKNIFE_VERSION = '10.0.0'
KOTLIN_VERSION = '1.3.50'
VERSIONS_VERSION = '0.20.0'
ANDROID_PLUGIN_VERSION = '3.6.3'
BUTTERKNIFE_VERSION = '10.2.1'
KOTLIN_VERSION = '1.3.72'
VERSIONS_VERSION = '0.28.0'
}

repositories {
Expand All @@ -19,6 +19,7 @@ buildscript {
classpath "com.jakewharton:butterknife-gradle-plugin:$BUTTERKNIFE_VERSION"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$KOTLIN_VERSION"
classpath "com.github.ben-manes:gradle-versions-plugin:$VERSIONS_VERSION"
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.11.1'
}
}

Expand Down
8 changes: 6 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION_NAME=1.4.0
VERSION_NAME=1.5.0
GROUP=com.airbnb.android
POM_DESCRIPTION=Paris is a system for creating and applying styles to views in Android.
POM_URL=https://github.com/airbnb/paris
Expand All @@ -14,4 +14,8 @@ [email protected]
POM_INCEPTION_YEAR=2017

android.useAndroidX=true
org.gradle.configureondemand=false
org.gradle.parallel=true
org.gradle.incremental=true
org.gradle.configureondemand=true
org.gradle.daemon=true
kotlin.incremental=true
216 changes: 0 additions & 216 deletions gradle/gradle-maven-push.gradle

This file was deleted.

23 changes: 0 additions & 23 deletions gradle/workaround-missing-resource.gradle

This file was deleted.

2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.4.1-all.zip
3 changes: 1 addition & 2 deletions paris-annotations/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: "com.vanniktech.maven.publish"

sourceCompatibility = rootProject.JAVA_SOURCE_VERSION
targetCompatibility = rootProject.JAVA_TARGET_VERSION

dependencies {
implementation deps.kotlin
}

apply from: rootProject.file('gradle/gradle-maven-push.gradle')
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ package com.airbnb.paris.annotations

@Target(AnnotationTarget.VALUE_PARAMETER)
annotation class Fraction(
val base: Int = 1,
val pbase: Int = 1)
val base: Int = 1,
val pbase: Int = 1
)
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.airbnb.paris.annotations

import kotlin.reflect.*
import kotlin.reflect.KClass

/**
* DO NOT USE. This annotation is meant to be used by generated classes only
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.SOURCE)
@Retention(RetentionPolicy.CLASS)
@Target(ElementType.PACKAGE)
public @interface ParisConfig {

Expand Down
Loading

0 comments on commit e674604

Please sign in to comment.