|
1 | 1 | import groovy.json.JsonBuilder
|
2 | 2 |
|
3 | 3 | plugins {
|
4 |
| - id "com.gradle.plugin-publish" version "0.12.0" |
5 | 4 | id 'groovy'
|
6 | 5 | id 'java-gradle-plugin'
|
| 6 | + id 'maven-publish' |
7 | 7 | id 'codenarc'
|
| 8 | + id "com.gradle.plugin-publish" version "0.12.0" |
8 | 9 | id "org.gradle.test-retry" version "1.2.0"
|
9 | 10 | }
|
10 | 11 |
|
@@ -67,41 +68,36 @@ sourceSets {
|
67 | 68 | }
|
68 | 69 | }
|
69 | 70 |
|
70 |
| -pluginBundle { |
71 |
| - website = 'https://github.com/gradle/android-cache-fix-gradle-plugin' |
72 |
| - vcsUrl = 'https://github.com/gradle/android-cache-fix-gradle-plugin' |
73 |
| - |
74 |
| - description = 'Gradle plugin to fix Android caching problems' |
75 |
| - |
| 71 | +gradlePlugin { |
76 | 72 | plugins {
|
77 | 73 | androidCacheFixPlugin {
|
78 | 74 | id = 'org.gradle.android.cache-fix'
|
79 | 75 | displayName = 'Gradle Android cache fix plugin'
|
80 |
| - tags = ['android', 'cache', 'fix'] |
81 |
| - version = project.version |
| 76 | + description = 'Gradle plugin to fix Android caching problems' |
| 77 | + implementationClass = 'org.gradle.android.AndroidCacheFixPlugin' |
82 | 78 | }
|
83 | 79 | }
|
84 | 80 | }
|
85 | 81 |
|
86 |
| -def localRepo = file("$buildDir/local-repo") |
| 82 | +pluginBundle { |
| 83 | + website = 'https://github.com/gradle/android-cache-fix-gradle-plugin' |
| 84 | + vcsUrl = 'https://github.com/gradle/android-cache-fix-gradle-plugin' |
87 | 85 |
|
88 |
| -artifacts { |
89 |
| - runtime jar |
| 86 | + tags = ['android', 'cache', 'fix'] |
90 | 87 | }
|
91 | 88 |
|
92 |
| -tasks.register('install', Upload) { |
| 89 | +def localRepo = file("$buildDir/local-repo") |
| 90 | + |
| 91 | +publishing { |
93 | 92 | repositories {
|
94 |
| - ivy { |
| 93 | + maven { |
95 | 94 | url = localRepo.toURI()
|
96 | 95 | }
|
97 | 96 | }
|
98 |
| - descriptorDestination = file("$buildDir/ivy/ivy.xml") |
99 |
| - uploadDescriptor = true |
100 |
| - configuration = configurations.runtime |
101 | 97 | }
|
102 | 98 |
|
103 | 99 | tasks.withType(Test).configureEach {
|
104 |
| - dependsOn install |
| 100 | + dependsOn publish |
105 | 101 | systemProperty "local.repo", localRepo.toURI()
|
106 | 102 | retry {
|
107 | 103 | maxRetries = 3
|
|
0 commit comments