You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you have multiple loosely-related gradle projects in separate repositories, then you probably have these problems:
@@ -171,14 +163,14 @@ plugins {
171
163
blowdryerSetup {
172
164
github('acme/blowdryer-acme', 'tag', 'v1.4.5')
173
165
setPluginsBlockTo {
174
-
file('plugin.versions')
166
+
it.file('plugin.versions')
175
167
}
176
168
}
177
169
```
178
170
179
171
First note that every plugin has `apply false` except for `com.diffplug.blowdryerSetup`. That is on purpose. We need to apply `blowdryerSetup` so that we can use the `blowdryerSetup {}` block, and we need to do `apply false` on the other plugins because we're just putting them on the classpath, not actually using them (yet).
180
172
181
-
The second thing to note is `setPluginsBlockTo { file('plugin.versions') }`. That means that if you go to `github.com/acme/blowdryer-acme` and then open the `v1.4.5` tab and then go into the `src/main/resources` folder, you will find a file called `plugin.versions`. And the content of that file will be
173
+
The second thing to note is `setPluginsBlockTo { it.file('plugin.versions') }`. That means that if you go to `github.com/acme/blowdryer-acme` and then open the `v1.4.5` tab and then go into the `src/main/resources` folder, you will find a file called `plugin.versions`. And the content of that file will be
182
174
183
175
```gradle
184
176
id 'com.diffplug.blowdryerSetup' version '1.7.0'
@@ -207,11 +199,11 @@ It doesn't *have* to be called `plugin.versions`, it's just using the `干.file`
207
199
208
200
```gradle
209
201
setPluginsBlockTo {
210
-
file('plugin.versions')
211
-
file('kotlin-extras.versions')
212
-
add(" id 'special-plugin-for-just-this-project' version '1.0.0'")
213
-
remove(" id 'acme.java' version '1.0.0' apply false")
214
-
replace('1.7.20', '1.8.0') // update Kotlin version but only for this build
202
+
it.file('plugin.versions')
203
+
it.file('kotlin-extras.versions')
204
+
it.add(" id 'special-plugin-for-just-this-project' version '1.0.0'")
205
+
it.remove(" id 'acme.java' version '1.0.0' apply false")
206
+
it.replace('1.7.20', '1.8.0') // update Kotlin version but only for this build
If you do `apply plugin: 'com.diffplug.blowdryer'` then every project gets an extension object ([code](https://github.com/diffplug/blowdryer/blob/master/src/main/java/com/diffplug/blowdryer/BlowdryerPlugin.java)) where the project field has been filled in for you, which is why we don't pass it explicitly in the examples before this section. If you don't apply the plugin, you can still call these static methods and pass `project` explicitly for the `proj()` methods.
0 commit comments