Skip to content

Commit

Permalink
renamed annotation module to api, added kotlin reflection test implem…
Browse files Browse the repository at this point in the history
…entation dependency to override version number for kluent and mockito
  • Loading branch information
dpnolte committed Nov 13, 2018
1 parent 8445cbd commit d6141b6
Show file tree
Hide file tree
Showing 13 changed files with 11 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ build/
.gradle
local.properties
*.iml
out/
out/
bin/
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ declare module "NativeTypes" {
visibility: Visibility;
}
enum Visibility { 'VISIBLE', 'INVISIBLE', 'GONE' }
enum Visibility { GONE='GONE', INVISIBLE='INVISIBLE', VISIBLE='VISIBLE' }
}
```

Expand Down Expand Up @@ -194,4 +194,4 @@ declare module "NativeTypes" {
Note that wild card will be converted to any

### Motivation
Android is more constrained as a platform. The annotation processor creates the typescript defintions at compile so that no overhead is added. The already existing generators were using reflection, which - on android- is a performance and a dex count hit.
Easy to use typescript generator by selecting classes with annotations
Binary file not shown.
File renamed without changes.
1 change: 1 addition & 0 deletions annotation/.gitignore → api/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/build
/out
/bin
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions codegen-impl/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/build
/out
/bin
4 changes: 3 additions & 1 deletion codegen-impl/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ apply plugin: 'kotlin-kapt'

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation project(":annotation")
implementation project(":api")
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.squareup:kotlinpoet:1.0.0-RC1'
implementation 'com.google.auto.service:auto-service:1.0-rc2'
Expand All @@ -16,6 +16,8 @@ dependencies {
testImplementation "org.jetbrains.kotlin:kotlin-stdlib:${rootProject.ext.kotlin_version}"
testImplementation "org.jetbrains.kotlin:kotlin-test-junit:${rootProject.ext.kotlin_version}"
testImplementation 'com.nhaarman:mockito-kotlin:1.6.0'
// override reflection number in mockito and in kluent
testImplementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
testImplementation 'org.amshove.kluent:kluent:1.37'
}

1 change: 1 addition & 0 deletions codegen/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/build
/out
/bin
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
include ':annotation', ':codegen'
include ':api', ':codegen'
include ':codegen-impl'

0 comments on commit d6141b6

Please sign in to comment.