From 2fcc725af2d438bde98743e6b67fcd0f56f9bec2 Mon Sep 17 00:00:00 2001 From: Trudu Laurent Date: Mon, 3 Oct 2022 10:57:14 +0200 Subject: [PATCH] Update to Gradle 7.3.3 Cleaned up graddle files --- build.gradle | 50 ++------ datawedgeprofileintentswrapper/build.gradle | 126 ++------------------ gradle/wrapper/gradle-wrapper.properties | 2 +- settings.gradle | 12 +- 4 files changed, 36 insertions(+), 154 deletions(-) diff --git a/build.gradle b/build.gradle index a5d3bb0..f9fd42d 100644 --- a/build.gradle +++ b/build.gradle @@ -1,51 +1,25 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. - - buildscript { + ext { + kotlin_version = '1.6.10' + compose_version = '1.0.5' + } repositories { google() - maven { url 'https://jitpack.io' } - //maven { - // url "https://dl.bintray.com/ltrudu/Zebra_Open_Source_Tools_And_Libraries" - //} mavenCentral() - maven { - url = uri("https://plugins.gradle.org/m2/") - } + maven { url 'https://jitpack.io' } + maven { url 'https://mvnrepository.com/artifact/com.github.gundy/semver4j' } + gradlePluginPortal() } dependencies { - classpath 'com.android.tools.build:gradle:4.2.0' - classpath 'com.github.dcendents:android-maven-plugin:1.2' - classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.0" - - //classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0' - - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files - } - -} - - -allprojects { - repositories { - maven { url 'https://jitpack.io' } - google() - mavenCentral() - maven { - url = uri("https://plugins.gradle.org/m2/") - } - //maven { - // url "https://dl.bintray.com/ltrudu/Zebra_Open_Source_Tools_And_Libraries" - //} + classpath "com.android.tools.build:gradle:7.1.1" + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } -ext { - compileSdkVersion = 30 - buildToolsVersion = '31.0.0' - versionName = '6.7.9' +plugins { + id 'com.android.library' version '7.1.3' apply false + id 'org.jetbrains.kotlin.android' version '1.6.0' apply false } task clean(type: Delete) { diff --git a/datawedgeprofileintentswrapper/build.gradle b/datawedgeprofileintentswrapper/build.gradle index 57ec08d..33e4bd3 100644 --- a/datawedgeprofileintentswrapper/build.gradle +++ b/datawedgeprofileintentswrapper/build.gradle @@ -1,23 +1,16 @@ -apply plugin: 'com.android.library' -//apply plugin: 'com.github.dcendents.android-maven' -apply plugin: 'org.jetbrains.kotlin.android' -group = 'com.github.ltrudu' -version = rootProject.ext.versionName - -//ext { -// PUBLISH_GROUP_ID = 'com.zebra.datawedgeprofileintentswrapper' -// PUBLISH_ARTIFACT_ID = 'datawedgeprofileintentswrapper' -// PUBLISH_VERSION = '6.7.7' -//} +plugins { + id 'com.android.library' + id 'org.jetbrains.kotlin.android' +} android { - compileSdkVersion 30 + compileSdkVersion 32 defaultConfig { minSdkVersion 19 - targetSdkVersion 30 - versionCode 6 - versionName "6.7.9" + targetSdkVersion 32 + versionCode 7 + versionName "6.7.9.4" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" @@ -29,6 +22,10 @@ android { proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } } dependencies { @@ -39,101 +36,4 @@ dependencies { testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test.ext:junit:1.1.2' androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' - // https://mvnrepository.com/artifact/com.google.code.gson/gson - //implementation group: 'com.google.code.gson', name: 'gson', version: '2.7' -} - -//def jarName = 'datawedgeprofileintents.jar' -// -//task clearJarRelease(type: Delete) { -// delete "${project.buildDir}/outputs/jar/release/" + jarName -//} -// -//task clearJarDebug(type: Delete) { -// delete "${project.buildDir}/outputs/jar/debug/" + jarName -//} -// -//task makeJarRelease(type: Copy) { -// from("${project.buildDir}/intermediates/intermediate-jars/release/") -// into("${project.buildDir}/outputs/jar/release") -// include('classes.jar') -// rename('classes.jar', jarName) -//} -// -//task makeJarDebug(type: Copy) { -// from("${project.buildDir}/intermediates/intermediate-jars/debug/") -// into("${project.buildDir}/outputs/jar/debug") -// include('classes.jar') -// rename('classes.jar', jarName) -//} -// -//task makeAllJar(type: Copy) {} -// -//makeJarRelease.dependsOn(clearJarRelease, build) -//makeJarDebug.dependsOn(clearJarDebug, build) -// -//makeAllJar.dependsOn(makeJarDebug,makeJarRelease) -// -///* -//Publish tasks -//https://medium.com/@daniellevass/how-to-publish-your-android-studio-library-to-jcenter-5384172c4739 -//https://raw.githubusercontent.com/blundell/release-android-library/master/android-release-aar.gradle -// */ -// -//// ./gradlew clean build generateRelease -//apply plugin: 'maven' -// -//def groupId = project.PUBLISH_GROUP_ID -//def artifactId = project.PUBLISH_ARTIFACT_ID -//def version = project.PUBLISH_VERSION -// -//def localReleaseDest = "${buildDir}/release/${version}" -// -//task androidJavadocs(type: Javadoc) { -// failOnError = false -// source = android.sourceSets.main.java.srcDirs -// ext.androidJar = "${android.sdkDirectory}/platforms/${android.compileSdkVersion}/android.jar" -// classpath += files(ext.androidJar) -//} -// -//task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) { -// archiveClassifier = 'javadoc' -// from androidJavadocs.destinationDir -//} -// -//task androidSourcesJar(type: Jar) { -// archiveClassifier = 'sources' -// from android.sourceSets.main.java.srcDirs -//} -// -//uploadArchives { -// repositories.mavenDeployer { -// pom.groupId = groupId -// pom.artifactId = artifactId -// pom.version = version -// // Add other pom properties here if you want (developer details / licenses) -// repository(url: "file://${localReleaseDest}") -// } -//} -// -//task zipRelease(type: Zip) { -// from localReleaseDest -// destinationDir buildDir -// archiveBaseName = "release-${version}" //.zip" -//} -// -//task generateRelease { -// doLast { -// println "Release ${version} can be found at ${localReleaseDest}/" -// println "Release ${version} zipped can be found ${buildDir}/release-${version}.zip" -// } -//} -// -//generateRelease.dependsOn(uploadArchives) -//generateRelease.dependsOn(zipRelease) -// -// -//artifacts { -// archives androidSourcesJar -// archives androidJavadocsJar -//} \ No newline at end of file +} \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 06cb184..cd04ee3 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Thu Aug 19 16:22:41 CEST 2021 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/settings.gradle b/settings.gradle index 5c6228f..e659097 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,11 +1,19 @@ -/* +pluginManagement { + repositories { + gradlePluginPortal() + google() + mavenCentral() + maven { url 'https://jitpack.io' } + } +} + dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { google() mavenCentral() maven { url "https://jitpack.io" } + maven { url 'https://mvnrepository.com/artifact/com.github.gundy/semver4j' } } } -*/ include ':datawedgeprofileintentswrapper'