@@ -18,22 +18,21 @@ plugins {
1818}
1919
2020dependencies {
21+ compileOnly gradleApi()
2122 // noinspection DependencyNotationArgument
22- implementation libs. gradle . api
23+ implementation libs. android . gradle
2324 // noinspection DependencyNotationArgument
2425 implementation libs. annotations
2526 // noinspection DependencyNotationArgument
2627 implementation libs. bundles. http. components
27- // noinspection DependencyNotationArgument
28- implementation libs. gson
29- compileOnly gradleApi()
3028
3129 testImplementation libs. junit
3230 // noinspection DependencyNotationArgument
3331 testImplementation libs. annotations
3432 testImplementation gradleTestKit()
3533 testImplementation(project)
3634}
35+
3736gradlePlugin {
3837 plugins {
3938 PublishingPlugin {
@@ -45,7 +44,6 @@ gradlePlugin {
4544 }
4645}
4746
48-
4947tasks. withType(Jar ). configureEach {
5048 archiveBaseName. set(plugin_identifier)
5149 archiveVersion. set(" ${ plugin_version} " )
@@ -55,8 +53,7 @@ tasks.withType(Test).configureEach {
5553 useJUnitPlatform()
5654}
5755
58- // noinspection ConfigurationAvoidance
59- task javadocs (type : Javadoc ) {
56+ tasks. register(' javadocs' , Javadoc ) {
6057 title = " ${ plugin_display_name} ${ plugin_version} API"
6158 source = java. sourceSets. main. java. srcDirs
6259 destinationDir = project. file(' /build/outputs/javadoc' )
@@ -68,15 +65,14 @@ task javadocs(type: Javadoc) {
6865 failOnError false
6966}
7067
71- // noinspection ConfigurationAvoidance
72- task javadocJar ( type : Jar , dependsOn : javadoc) {
68+ tasks . register( ' javadocJar ' , Jar ) {
69+ dependsOn javadoc
7370 dependsOn javadoc
7471 archiveClassifier. set(' javadoc' )
7572 from javadoc. destinationDir
7673}
7774
78- // noinspection ConfigurationAvoidance
79- task sourcesJar (type : Jar ) {
75+ tasks. register(' sourcesJar' , Jar ) {
8076 from java. sourceSets. main. java. srcDirs
8177 archiveClassifier. set(' sources' )
8278}
0 commit comments