Skip to content
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

Annotation processors in Kotlin #775

Merged
merged 14 commits into from
Apr 3, 2017
6 changes: 6 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import org.gradle.internal.jvm.Jvm
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.1.1'
repositories {
jcenter()
}
Expand All @@ -16,6 +17,9 @@ buildscript {
// https://github.com/palantir/gradle-jacoco-coverage
classpath 'com.palantir:jacoco-coverage:0.2.0'

// Kotlin
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand Down Expand Up @@ -50,6 +54,7 @@ ext.libraries = [
// Core libraries
supportAnnotations : 'com.android.support:support-annotations:' + supportLibsVersion,
rxJava : 'io.reactivex:rxjava:1.2.1',
kotlinStdLib : "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version",

// Parts of StorIO
storIOCommon : project(':storio-common'),
Expand All @@ -67,6 +72,7 @@ ext.libraries = [
assertJ : 'org.assertj:assertj-core:3.6.2',
assertJAndroid : 'com.squareup.assertj:assertj-android:1.1.1',
mockitoCore : 'org.mockito:mockito-core:2.7.19',
mockitoKotlin : 'com.nhaarman:mockito-kotlin:1.4.0',

equalsVerifier : 'nl.jqno.equalsverifier:equalsverifier:1.7.2',
privateConstructorChecker : 'com.pushtorefresh.java-private-constructor-checker:checker:1.1.0',
Expand Down
16 changes: 10 additions & 6 deletions storio-common-annotations-processor/build.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
apply plugin: 'java'

targetCompatibility = '1.6'
sourceCompatibility = '1.6'
apply plugin: 'kotlin'

dependencies {
compile libraries.intellijAnnotations
compile libraries.autoService
compile libraries.javaPoet
compile libraries.kotlinStdLib
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will it increase module methods count on 6k? =(

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't remember the exact number of methods in Kotlin stdlib, but it doesn't matter anyway because this dependency isn't going to be in apk so dex limit won't be affected.


testCompile libraries.junit
testCompile libraries.assertJ
testCompile libraries.mockitoCore
testCompile libraries.mockitoKotlin
testCompile libraries.equalsVerifier
}


sourceSets {
main.java.srcDirs += 'src/main/kotlin'
test.java.srcDir 'src/test/kotlin'
}

apply from: '../gradle/publish-java-lib.gradle'
apply from: '../gradle/jacoco-non-android.gradle'
apply from: '../gradle/jacoco-non-android.gradle'

This file was deleted.

This file was deleted.

Loading