forked from loafle/openapi-generator-original
Fix tests by upgrading libraries
This commit is contained in:
parent
a892511b1f
commit
7296da7bc3
@ -23,7 +23,7 @@ if(hasProperty('target') && target == 'android') {
|
|||||||
|
|
||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
apply plugin: 'com.github.dcendents.android-maven'
|
apply plugin: 'com.github.dcendents.android-maven'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 22
|
compileSdkVersion 22
|
||||||
buildToolsVersion '22.0.0'
|
buildToolsVersion '22.0.0'
|
||||||
@ -35,7 +35,7 @@ if(hasProperty('target') && target == 'android') {
|
|||||||
sourceCompatibility JavaVersion.VERSION_1_7
|
sourceCompatibility JavaVersion.VERSION_1_7
|
||||||
targetCompatibility JavaVersion.VERSION_1_7
|
targetCompatibility JavaVersion.VERSION_1_7
|
||||||
}
|
}
|
||||||
|
|
||||||
// Rename the aar correctly
|
// Rename the aar correctly
|
||||||
libraryVariants.all { variant ->
|
libraryVariants.all { variant ->
|
||||||
variant.outputs.each { output ->
|
variant.outputs.each { output ->
|
||||||
@ -51,7 +51,7 @@ if(hasProperty('target') && target == 'android') {
|
|||||||
provided 'javax.annotation:jsr250-api:1.0'
|
provided 'javax.annotation:jsr250-api:1.0'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
afterEvaluate {
|
afterEvaluate {
|
||||||
android.libraryVariants.all { variant ->
|
android.libraryVariants.all { variant ->
|
||||||
def task = project.tasks.create "jar${variant.name.capitalize()}", Jar
|
def task = project.tasks.create "jar${variant.name.capitalize()}", Jar
|
||||||
@ -63,12 +63,12 @@ if(hasProperty('target') && target == 'android') {
|
|||||||
artifacts.add('archives', task);
|
artifacts.add('archives', task);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task sourcesJar(type: Jar) {
|
task sourcesJar(type: Jar) {
|
||||||
from android.sourceSets.main.java.srcDirs
|
from android.sourceSets.main.java.srcDirs
|
||||||
classifier = 'sources'
|
classifier = 'sources'
|
||||||
}
|
}
|
||||||
|
|
||||||
artifacts {
|
artifacts {
|
||||||
archives sourcesJar
|
archives sourcesJar
|
||||||
}
|
}
|
||||||
@ -77,16 +77,16 @@ if(hasProperty('target') && target == 'android') {
|
|||||||
|
|
||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
apply plugin: 'maven'
|
apply plugin: 'maven'
|
||||||
|
|
||||||
sourceCompatibility = JavaVersion.VERSION_1_7
|
sourceCompatibility = JavaVersion.VERSION_1_7
|
||||||
targetCompatibility = JavaVersion.VERSION_1_7
|
targetCompatibility = JavaVersion.VERSION_1_7
|
||||||
|
|
||||||
install {
|
install {
|
||||||
repositories.mavenInstaller {
|
repositories.mavenInstaller {
|
||||||
pom.artifactId = '{{artifactId}}'
|
pom.artifactId = '{{artifactId}}'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task execute(type:JavaExec) {
|
task execute(type:JavaExec) {
|
||||||
main = System.getProperty('mainClass')
|
main = System.getProperty('mainClass')
|
||||||
classpath = sourceSets.main.runtimeClasspath
|
classpath = sourceSets.main.runtimeClasspath
|
||||||
@ -96,9 +96,9 @@ if(hasProperty('target') && target == 'android') {
|
|||||||
ext {
|
ext {
|
||||||
swagger_annotations_version = "1.5.0"
|
swagger_annotations_version = "1.5.0"
|
||||||
jackson_version = "2.4.2"
|
jackson_version = "2.4.2"
|
||||||
jersey_version = "2.6"
|
jersey_version = "2.22"
|
||||||
jodatime_version = "2.3"
|
jodatime_version = "2.3"
|
||||||
junit_version = "4.8.1"
|
junit_version = "4.12"
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
@ -150,7 +150,7 @@
|
|||||||
<artifactId>jersey-media-json-jackson</artifactId>
|
<artifactId>jersey-media-json-jackson</artifactId>
|
||||||
<version>2.22.1</version>
|
<version>2.22.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- JSON processing: jackson -->
|
<!-- JSON processing: jackson -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.fasterxml.jackson.core</groupId>
|
<groupId>com.fasterxml.jackson.core</groupId>
|
||||||
@ -195,10 +195,10 @@
|
|||||||
</dependencies>
|
</dependencies>
|
||||||
<properties>
|
<properties>
|
||||||
<swagger-annotations-version>1.5.0</swagger-annotations-version>
|
<swagger-annotations-version>1.5.0</swagger-annotations-version>
|
||||||
<jersey-version>2.12</jersey-version>
|
<jersey-version>2.22</jersey-version>
|
||||||
<jackson-version>2.4.2</jackson-version>
|
<jackson-version>2.4.2</jackson-version>
|
||||||
<jodatime-version>2.3</jodatime-version>
|
<jodatime-version>2.3</jodatime-version>
|
||||||
<maven-plugin-version>1.0.0</maven-plugin-version>
|
<maven-plugin-version>1.0.0</maven-plugin-version>
|
||||||
<junit-version>4.8.1</junit-version>
|
<junit-version>4.12</junit-version>
|
||||||
</properties>
|
</properties>
|
||||||
</project>
|
</project>
|
||||||
|
@ -23,7 +23,7 @@ if(hasProperty('target') && target == 'android') {
|
|||||||
|
|
||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
apply plugin: 'com.github.dcendents.android-maven'
|
apply plugin: 'com.github.dcendents.android-maven'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 22
|
compileSdkVersion 22
|
||||||
buildToolsVersion '22.0.0'
|
buildToolsVersion '22.0.0'
|
||||||
@ -35,7 +35,7 @@ if(hasProperty('target') && target == 'android') {
|
|||||||
sourceCompatibility JavaVersion.VERSION_1_7
|
sourceCompatibility JavaVersion.VERSION_1_7
|
||||||
targetCompatibility JavaVersion.VERSION_1_7
|
targetCompatibility JavaVersion.VERSION_1_7
|
||||||
}
|
}
|
||||||
|
|
||||||
// Rename the aar correctly
|
// Rename the aar correctly
|
||||||
libraryVariants.all { variant ->
|
libraryVariants.all { variant ->
|
||||||
variant.outputs.each { output ->
|
variant.outputs.each { output ->
|
||||||
@ -51,7 +51,7 @@ if(hasProperty('target') && target == 'android') {
|
|||||||
provided 'javax.annotation:jsr250-api:1.0'
|
provided 'javax.annotation:jsr250-api:1.0'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
afterEvaluate {
|
afterEvaluate {
|
||||||
android.libraryVariants.all { variant ->
|
android.libraryVariants.all { variant ->
|
||||||
def task = project.tasks.create "jar${variant.name.capitalize()}", Jar
|
def task = project.tasks.create "jar${variant.name.capitalize()}", Jar
|
||||||
@ -63,12 +63,12 @@ if(hasProperty('target') && target == 'android') {
|
|||||||
artifacts.add('archives', task);
|
artifacts.add('archives', task);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task sourcesJar(type: Jar) {
|
task sourcesJar(type: Jar) {
|
||||||
from android.sourceSets.main.java.srcDirs
|
from android.sourceSets.main.java.srcDirs
|
||||||
classifier = 'sources'
|
classifier = 'sources'
|
||||||
}
|
}
|
||||||
|
|
||||||
artifacts {
|
artifacts {
|
||||||
archives sourcesJar
|
archives sourcesJar
|
||||||
}
|
}
|
||||||
@ -77,16 +77,16 @@ if(hasProperty('target') && target == 'android') {
|
|||||||
|
|
||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
apply plugin: 'maven'
|
apply plugin: 'maven'
|
||||||
|
|
||||||
sourceCompatibility = JavaVersion.VERSION_1_7
|
sourceCompatibility = JavaVersion.VERSION_1_7
|
||||||
targetCompatibility = JavaVersion.VERSION_1_7
|
targetCompatibility = JavaVersion.VERSION_1_7
|
||||||
|
|
||||||
install {
|
install {
|
||||||
repositories.mavenInstaller {
|
repositories.mavenInstaller {
|
||||||
pom.artifactId = 'swagger-petstore-jersey2'
|
pom.artifactId = 'swagger-petstore-jersey2'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task execute(type:JavaExec) {
|
task execute(type:JavaExec) {
|
||||||
main = System.getProperty('mainClass')
|
main = System.getProperty('mainClass')
|
||||||
classpath = sourceSets.main.runtimeClasspath
|
classpath = sourceSets.main.runtimeClasspath
|
||||||
@ -96,9 +96,9 @@ if(hasProperty('target') && target == 'android') {
|
|||||||
ext {
|
ext {
|
||||||
swagger_annotations_version = "1.5.0"
|
swagger_annotations_version = "1.5.0"
|
||||||
jackson_version = "2.4.2"
|
jackson_version = "2.4.2"
|
||||||
jersey_version = "2.6"
|
jersey_version = "2.22"
|
||||||
jodatime_version = "2.3"
|
jodatime_version = "2.3"
|
||||||
junit_version = "4.8.1"
|
junit_version = "4.12"
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
@ -150,7 +150,7 @@
|
|||||||
<artifactId>jersey-media-json-jackson</artifactId>
|
<artifactId>jersey-media-json-jackson</artifactId>
|
||||||
<version>2.22.1</version>
|
<version>2.22.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- JSON processing: jackson -->
|
<!-- JSON processing: jackson -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.fasterxml.jackson.core</groupId>
|
<groupId>com.fasterxml.jackson.core</groupId>
|
||||||
@ -195,10 +195,10 @@
|
|||||||
</dependencies>
|
</dependencies>
|
||||||
<properties>
|
<properties>
|
||||||
<swagger-annotations-version>1.5.0</swagger-annotations-version>
|
<swagger-annotations-version>1.5.0</swagger-annotations-version>
|
||||||
<jersey-version>2.12</jersey-version>
|
<jersey-version>2.22</jersey-version>
|
||||||
<jackson-version>2.4.2</jackson-version>
|
<jackson-version>2.4.2</jackson-version>
|
||||||
<jodatime-version>2.3</jodatime-version>
|
<jodatime-version>2.3</jodatime-version>
|
||||||
<maven-plugin-version>1.0.0</maven-plugin-version>
|
<maven-plugin-version>1.0.0</maven-plugin-version>
|
||||||
<junit-version>4.8.1</junit-version>
|
<junit-version>4.12</junit-version>
|
||||||
</properties>
|
</properties>
|
||||||
</project>
|
</project>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user