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
@@ -43,8 +44,11 @@ dependencies {
43
44
testRuntime ' org.objenesis:objenesis:3.1'
44
45
}
45
46
46
- sourceCompatibility = " 1.8"
47
- targetCompatibility = " 1.8"
47
+ java {
48
+ toolchain {
49
+ languageVersion = JavaLanguageVersion . of(8 )
50
+ }
51
+ }
48
52
49
53
def generatedResources = " $buildDir /generated-resources/main"
50
54
@@ -67,48 +71,39 @@ sourceSets {
67
71
}
68
72
}
69
73
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
-
74
+ gradlePlugin {
76
75
plugins {
77
76
androidCacheFixPlugin {
78
77
id = ' org.gradle.android.cache-fix'
79
78
displayName = ' Gradle Android cache fix plugin'
80
- tags = [ ' android ' , ' cache ' , ' fix' ]
81
- version = project . version
79
+ description = ' Gradle plugin to fix Android caching problems '
80
+ implementationClass = ' org.gradle.android.AndroidCacheFixPlugin '
82
81
}
83
82
}
84
83
}
85
84
86
- def localRepo = file(" $buildDir /local-repo" )
85
+ pluginBundle {
86
+ website = ' https://github.com/gradle/android-cache-fix-gradle-plugin'
87
+ vcsUrl = ' https://github.com/gradle/android-cache-fix-gradle-plugin'
87
88
88
- artifacts {
89
- runtime jar
89
+ tags = [' android' , ' cache' , ' fix' ]
90
90
}
91
91
92
- tasks. register(' install' , Upload ) {
92
+ def localRepo = file(" $buildDir /local-repo" )
93
+
94
+ publishing {
93
95
repositories {
94
- ivy {
96
+ maven {
95
97
url = localRepo. toURI()
96
98
}
97
99
}
98
- descriptorDestination = file(" $buildDir /ivy/ivy.xml" )
99
- uploadDescriptor = true
100
- configuration = configurations. runtime
101
100
}
102
101
103
102
tasks. withType(Test ). configureEach {
104
- dependsOn install
103
+ dependsOn publish
105
104
systemProperty " local.repo" , localRepo. toURI()
106
105
retry {
107
106
maxRetries = 3
108
107
maxFailures = 20
109
108
}
110
- }
111
-
112
- if (! JavaVersion . current(). java8) {
113
- throw new RuntimeException (" Java 8 is required to execute the build" )
114
- }
109
+ }
0 commit comments