Skip to content
This repository was archived by the owner on Aug 26, 2021. It is now read-only.

Commit 9a89c7c

Browse files
committed
Add Gradle information
1 parent 618a7d6 commit 9a89c7c

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,38 @@ dependency:
3535
</dependencies>
3636
```
3737

38+
In a Gradle Android project:
39+
40+
```groovy
41+
apply plugin: 'com.android.application'
42+
43+
dependencies {
44+
compile 'com.squareup.dagger:dagger:${dagger.version}'
45+
provided 'com.squareup.dagger:dagger-compiler:${dagger.version}'
46+
}
47+
```
48+
49+
In a Gradle Java project:
50+
51+
```groovy
52+
apply plugin: 'java'
53+
54+
configurations {
55+
provided
56+
}
57+
58+
sourceSets {
59+
main.compileClasspath += configurations.provided
60+
test.compileClasspath += configurations.provided
61+
test.runtimeClasspath += configurations.provided
62+
}
63+
64+
dependencies {
65+
compile 'com.squareup.dagger:dagger:${dagger.version}'
66+
provided 'com.squareup.dagger:dagger-compiler:${dagger.version}'
67+
}
68+
```
69+
3870
You can also find downloadable .jars on Maven Central. You'll need
3971
[Dagger][dl-dagger], [JavaWriter][dl-javawriter], and [javax.inject][dl-inject].
4072

0 commit comments

Comments
 (0)