From fc277540f4a1d16f7f218e90d235d4d515a56a5a Mon Sep 17 00:00:00 2001 From: Alexey Vasilyev Date: Wed, 3 Nov 2021 10:56:39 +0200 Subject: [PATCH] Gradle 7.2 --- app/build.gradle | 13 +++++---- app/src/main/AndroidManifest.xml | 4 +-- build.gradle | 13 +++++---- constants.gradle | 11 ++------ gradle/wrapper/gradle-wrapper.properties | 2 +- library-timeline/build.gradle | 34 +++++++++++++++--------- 6 files changed, 40 insertions(+), 37 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index ccb4913..6780769 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,16 +1,15 @@ apply from: '../constants.gradle' apply plugin: 'com.android.application' apply plugin: 'kotlin-android' -apply plugin: 'kotlin-android-extensions' android { - compileSdkVersion 30 - buildToolsVersion "30.0.3" + compileSdkVersion 31 + buildToolsVersion "31.0.0" defaultConfig { applicationId "com.alexvas.timeline.demo" minSdkVersion 21 - targetSdkVersion 30 + targetSdkVersion 31 versionCode 1 versionName "1.0" @@ -42,9 +41,9 @@ dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${kotlin_version}" implementation "androidx.appcompat:appcompat:${androidXAppcompatVersion}" - implementation 'androidx.core:core-ktx:1.3.2' - implementation 'com.google.android.material:material:1.2.1' - implementation 'androidx.constraintlayout:constraintlayout:2.0.4' + implementation 'androidx.core:core-ktx:1.7.0' + implementation 'com.google.android.material:material:1.4.0' + implementation 'androidx.constraintlayout:constraintlayout:2.1.1' implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0' implementation "androidx.navigation:navigation-fragment:${androidXNavigationVersion}" implementation "androidx.navigation:navigation-ui:${androidXNavigationVersion}" diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index e947ba3..5e79767 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -3,7 +3,6 @@ package="com.alexvas.timeline.demo"> + android:label="@string/app_name" + android:exported="true"> diff --git a/build.gradle b/build.gradle index c6dc54a..bd2334b 100644 --- a/build.gradle +++ b/build.gradle @@ -1,20 +1,23 @@ buildscript { - ext.kotlin_version = '1.4.21' + ext.kotlin_version = '1.5.31' + ext.compile_sdk_version = 31 + ext.min_sdk_version = 21 + ext.target_sdk_version = 31 + ext.project_version_code = 145 + ext.project_version_name = '1.4.5' + repositories { - jcenter() google() mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:4.1.1' + classpath 'com.android.tools.build:gradle:7.0.3' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' } } allprojects { repositories { - jcenter() google() mavenCentral() } diff --git a/constants.gradle b/constants.gradle index 1ad5855..5036e28 100644 --- a/constants.gradle +++ b/constants.gradle @@ -1,12 +1,5 @@ project.ext { - compileSdkVersion = 30 - buildToolsVersion = '30.0.3' - minSdkVersion = 21 // 5.0 - targetSdkVersion = 30 // 11.0 - releaseVersion = "1.4.4" - releaseVersionCode = 144 - - androidXAnnotationVersion = '1.1.0' - androidXAppcompatVersion = '1.2.0' + androidXAnnotationVersion = '1.2.0' + androidXAppcompatVersion = '1.3.1' androidXNavigationVersion = '2.3.2' } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ab0ec1f..afb7658 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip diff --git a/library-timeline/build.gradle b/library-timeline/build.gradle index 984ed02..e18a982 100644 --- a/library-timeline/build.gradle +++ b/library-timeline/build.gradle @@ -1,22 +1,30 @@ +plugins { + id 'com.android.library' + id 'kotlin-android' + id 'maven-publish' +} + apply from: '../constants.gradle' apply plugin: 'com.android.library' -apply plugin: 'com.github.dcendents.android-maven' -group = 'com.github.alexeyvasilyev' + +project.afterEvaluate { + publishing { + publications { + release(MavenPublication) { + from components.release + } + } + } +} android { - compileSdkVersion project.ext.compileSdkVersion - buildToolsVersion project.ext.buildToolsVersion + compileSdkVersion compile_sdk_version defaultConfig { - minSdkVersion project.ext.minSdkVersion - targetSdkVersion project.ext.targetSdkVersion - versionName project.ext.releaseVersion - versionCode project.ext.releaseVersionCode - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + minSdkVersion min_sdk_version + targetSdkVersion target_sdk_version + versionCode project_version_code + versionName project_version_name } }