Update gradle + android gradle
This commit is contained in:
@@ -7,7 +7,7 @@ buildscript {
|
|||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:4.0.2'
|
classpath 'com.android.tools.build:gradle:7.3.1'
|
||||||
|
|
||||||
|
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
|
|||||||
@@ -7,11 +7,8 @@ version = '1.0.0'
|
|||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
jcenter()
|
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:4.0.0'
|
|
||||||
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -20,78 +17,10 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(hasProperty('target') && target == 'android') {
|
apply plugin: 'java-library'
|
||||||
|
|
||||||
apply plugin: 'com.android.library'
|
sourceCompatibility = JavaVersion.VERSION_1_7
|
||||||
apply plugin: 'com.github.dcendents.android-maven'
|
targetCompatibility = JavaVersion.VERSION_1_7
|
||||||
|
|
||||||
android {
|
|
||||||
compileSdkVersion 28
|
|
||||||
defaultConfig {
|
|
||||||
minSdkVersion 19
|
|
||||||
targetSdkVersion 28
|
|
||||||
}
|
|
||||||
compileOptions {
|
|
||||||
sourceCompatibility JavaVersion.VERSION_1_7
|
|
||||||
targetCompatibility JavaVersion.VERSION_1_7
|
|
||||||
}
|
|
||||||
|
|
||||||
// Rename the aar correctly
|
|
||||||
libraryVariants.all { variant ->
|
|
||||||
variant.outputs.each { output ->
|
|
||||||
def outputFile = output.outputFile
|
|
||||||
if (outputFile != null && outputFile.name.endsWith('.aar')) {
|
|
||||||
def fileName = "${project.name}-${variant.baseName}-${version}.aar"
|
|
||||||
output.outputFile = new File(outputFile.parent, fileName)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
provided 'javax.annotation:jsr250-api:1.0'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
afterEvaluate {
|
|
||||||
android.libraryVariants.all { variant ->
|
|
||||||
def task = project.tasks.create "jar${variant.name.capitalize()}", Jar
|
|
||||||
task.description = "Create jar artifact for ${variant.name}"
|
|
||||||
task.dependsOn variant.javaCompile
|
|
||||||
task.from variant.javaCompile.destinationDir
|
|
||||||
task.destinationDir = project.file("${project.buildDir}/outputs/jar")
|
|
||||||
task.archiveName = "${project.name}-${variant.baseName}-${version}.jar"
|
|
||||||
artifacts.add('archives', task);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
task sourcesJar(type: Jar) {
|
|
||||||
from android.sourceSets.main.java.srcDirs
|
|
||||||
archiveClassifier = 'sources'
|
|
||||||
}
|
|
||||||
|
|
||||||
artifacts {
|
|
||||||
archives sourcesJar
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
apply plugin: 'java'
|
|
||||||
apply plugin: 'maven'
|
|
||||||
|
|
||||||
sourceCompatibility = JavaVersion.VERSION_1_7
|
|
||||||
targetCompatibility = JavaVersion.VERSION_1_7
|
|
||||||
|
|
||||||
install {
|
|
||||||
repositories.mavenInstaller {
|
|
||||||
pom.artifactId = 'swagger-java-client'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
task execute(type:JavaExec) {
|
|
||||||
main = System.getProperty('mainClass')
|
|
||||||
classpath = sourceSets.main.runtimeClasspath
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ext {
|
ext {
|
||||||
oltu_version = "1.0.2"
|
oltu_version = "1.0.2"
|
||||||
@@ -103,14 +32,14 @@ ext {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile "com.squareup.retrofit2:retrofit:$retrofit_version"
|
api "com.squareup.retrofit2:retrofit:$retrofit_version"
|
||||||
compile "com.squareup.retrofit2:converter-scalars:$retrofit_version"
|
api "com.squareup.retrofit2:converter-scalars:$retrofit_version"
|
||||||
compile "com.squareup.retrofit2:converter-gson:$retrofit_version"
|
api "com.squareup.retrofit2:converter-gson:$retrofit_version"
|
||||||
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
|
api "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||||
compile ("org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:$oltu_version") {
|
implementation ("org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:$oltu_version") {
|
||||||
exclude group:'org.apache.oltu.oauth2' , module: 'org.apache.oltu.oauth2.common'
|
exclude group:'org.apache.oltu.oauth2' , module: 'org.apache.oltu.oauth2.common'
|
||||||
}
|
}
|
||||||
compile "io.gsonfire:gson-fire:$json_fire_version"
|
api "io.gsonfire:gson-fire:$json_fire_version"
|
||||||
compile "org.threeten:threetenbp:$threetenbp_version"
|
api "org.threeten:threetenbp:$threetenbp_version"
|
||||||
testCompile "junit:junit:$junit_version"
|
testImplementation "junit:junit:$junit_version"
|
||||||
}
|
}
|
||||||
|
|||||||
6
gradle/wrapper/gradle-wrapper.properties
vendored
6
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,6 @@
|
|||||||
#Fri Jul 10 21:53:51 EEST 2020
|
#Sat Oct 22 15:31:42 CEST 2022
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-rc-4-all.zip
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
Reference in New Issue
Block a user