update build.gradle to work with gradle 7.x, add test (#10669)

This commit is contained in:
William Cheng
2021-10-24 12:19:52 +08:00
committed by GitHub
parent ec2ed98269
commit 2413783288
5 changed files with 41 additions and 28 deletions

View File

@@ -7,8 +7,7 @@ version = '1.0.0'
buildscript {
repositories {
maven { url "https://repo1.maven.org/maven2" }
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.+'
@@ -17,7 +16,7 @@ buildscript {
}
repositories {
jcenter()
mavenCentral()
}
sourceSets {
main.java.srcDirs = ['src/main/java']
@@ -80,14 +79,17 @@ if(hasProperty('target') && target == 'android') {
} else {
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'maven-publish'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
install {
repositories.mavenInstaller {
pom.artifactId = 'petstore-okhttp-gson-dynamicoperations'
publishing {
publications {
maven(MavenPublication) {
artifactId = 'petstore-okhttp-gson-dynamicoperations'
from components.java
}
}
}
@@ -115,6 +117,7 @@ dependencies {
implementation 'io.swagger.parser.v3:swagger-parser-v3:2.0.23'
implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version"
testImplementation 'junit:junit:4.13.1'
testImplementation 'org.mockito:mockito-core:3.11.2'
}
javadoc {