Skip to content

Commit c4ba9ec

Browse files
authored
Merge pull request #1 from muradeliyev/fix/old-dependencies-update
Dependencies Update
2 parents 74b532b + c5c7cc8 commit c4ba9ec

File tree

24 files changed

+244
-144
lines changed

24 files changed

+244
-144
lines changed

annotation/build.gradle

Lines changed: 0 additions & 2 deletions
This file was deleted.

annotation/build.gradle.kts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
plugins {
2+
`java-library`
3+
id("com.vanniktech.maven.publish")
4+
}
5+
//apply plugin: 'java-library'
6+
//apply plugin: "com.vanniktech.maven.publish"

build.gradle

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
buildscript {
22
repositories {
3+
google {
4+
content {
5+
includeGroupByRegex("com\\.android.*")
6+
includeGroupByRegex("com\\.google.*")
7+
includeGroupByRegex("androidx.*")
8+
}
9+
}
310
mavenCentral()
4-
google()
5-
jcenter()
11+
gradlePluginPortal()
12+
maven {
13+
url = uri("https://jitpack.io")
14+
}
615
}
16+
717
dependencies {
818
classpath "com.android.tools.build:gradle:$GRADLE_PLUGIN_VERSION"
919
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$KOTLIN_VERSION"
1020
classpath "org.jetbrains.dokka:dokka-gradle-plugin:$DOKKA_VERSION"
1121
classpath "com.vanniktech:gradle-maven-publish-plugin:$PUBLISH_PLUGIN_VERSION"
1222
}
1323
}
14-
15-
allprojects {
16-
repositories {
17-
mavenCentral()
18-
google()
19-
jcenter()
20-
// TODO: remove after publishing kompile-testing to Maven Central
21-
maven { url 'https://jitpack.io' }
22-
}
23-
}

buildSrc/src/main/groovy/permissions/dispatcher/AarToJarDependencyPlugin.groovy

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import org.gradle.api.DefaultTask
55
import org.gradle.api.Plugin
66
import org.gradle.api.Project
77
import org.gradle.api.file.FileCollection
8-
import org.gradle.api.tasks.Input
8+
import org.gradle.api.tasks.InputFile
99
import org.gradle.api.tasks.OutputDirectory
1010
import org.gradle.api.tasks.TaskAction
1111

@@ -41,6 +41,7 @@ class AarToJarConversionPlugin implements Plugin<Project> {
4141
def configuration = project.configurations.create(CONFIGURATION_NAME)
4242

4343
// Conversion Task
44+
println("messi: $configuration")
4445
def conversionTask = project.tasks.create(TASK_NAME, ConvertAarToJarTask) {
4546
inputFiles = configuration
4647
jarOutputDir = project.file("$project.buildDir/tmp/converted-aars")
@@ -53,7 +54,7 @@ class AarToJarConversionPlugin implements Plugin<Project> {
5354

5455
static class ConvertAarToJarTask extends DefaultTask {
5556

56-
@Input
57+
@InputFile
5758
FileCollection inputFiles
5859

5960
@OutputDirectory
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import org.gradle.api.JavaVersion;
2+
3+
4+
public class Versions {
5+
6+
public static final JavaVersion JAVA_VERSION = JavaVersion.VERSION_21;
7+
}

gradle.properties

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Upload configuration
2-
USER = hotchemi
2+
USER = muradeliyev
33
GROUP = com.github.permissions-dispatcher
4-
VERSION_NAME = 4.10.0-SNAPSHOT
4+
VERSION_NAME = 5.0.0
55
POM_NAME = PermissionsDispatcher
66
POM_DESCRIPTION = A declarative API to handle Android runtime permissions.
77
POM_INCEPTION_YEAR = 2015
@@ -11,40 +11,41 @@ POM_SCM_CONNECTION = https://github.com/permissions-dispatcher/PermissionsD
1111
POM_LICENCE_NAME = The Apache Software License, Version 2.0
1212
POM_LICENCE_URL = https://www.apache.org/licenses/LICENSE-2.0.txt
1313
POM_LICENCE_DIST = repo
14-
POM_DEVELOPER_ID = hotchemi
15-
POM_DEVELOPER_NAME = Shintaro Katafuchi
16-
POM_DEVELOPER_URL = https://github.com/hotchemi
14+
POM_DEVELOPER_ID = muradeliyev
15+
POM_DEVELOPER_NAME = Murad Aliyev
16+
POM_DEVELOPER_URL = https://github.com/muradeliyev
1717

1818
# Plugin versions
19-
DOKKA_VERSION = 1.4.20
20-
PUBLISH_PLUGIN_VERSION = 0.18.0
21-
GRADLE_PLUGIN_VERSION = 4.2.0
22-
KOTLIN_VERSION = 1.5.20
23-
KOTLIN_METADATA_VERSION = 0.3.0
24-
ANDROIDX_LIBRARY_VERSION= 1.0.0
25-
LIFECYCLE_VERSION = 2.2.0
26-
ARC_TESTING_VERSION = 1.1.1
27-
JAVAPOET_VERSION = 1.9.0
28-
KOTLINPOET_VERSION = 1.3.0
29-
JUNIT_VERSION = 4.12
30-
MOCKITO_VERSION = 2.28.2
31-
MOCKITO_KOTLIN_VERSION = 2.2.0
32-
POWERMOCK_VERSION = 2.0.2
33-
COMPILE_TESTING_VERSION = 0.12
34-
LINT_VERSION = 26.3.2
35-
ROBOLECTRIC_VERSION = 3.3.2
36-
COMMONS_IO_VERSION = 2.6
37-
KOMPILE_TESTING_VERSION = 0.1.4
19+
DOKKA_VERSION = 2.0.0
20+
PUBLISH_PLUGIN_VERSION = 0.31.0
21+
GRADLE_PLUGIN_VERSION = 8.6.0
22+
KOTLIN_VERSION = 2.1.20
23+
KOTLIN_METADATA_VERSION = 0.5.0
24+
ANDROIDX_LIBRARY_VERSION= 1.9.1
25+
ANDROIDX_APPCOMPAT_VERSION = 1.7.0
26+
ANDROIDX_FRAGMENT_VERSION = 1.8.3
27+
LIFECYCLE_VERSION = 2.9.0-alpha03
28+
ARC_TESTING_VERSION = 2.0.0
29+
JAVAPOET_VERSION = 1.13.0
30+
KOTLINPOET_VERSION = 2.1.0
31+
JUNIT_VERSION = 4.13.2
32+
MOCKITO_KOTLIN_VERSION = 5.4.0
33+
POWERMOCK_VERSION = 2.0.9
34+
COMPILE_TESTING_VERSION = 0.21.0
35+
LINT_VERSION = 30.3.2
36+
ROBOLECTRIC_VERSION = 4.10.3
37+
COMMONS_IO_VERSION = 2.13.0
38+
KOMPILE_TESTING_VERSION = 0.1.3
3839

3940
# Android configuration
40-
COMPILE_SDK_VERSION = android-29
41-
TARGET_SDK_VERSION = 29
42-
MIN_SDK_VERSION = 14
43-
SAMPLE_MIN_SDK_VERSION = 16
41+
COMPILE_SDK_VERSION = android-35
42+
TARGET_SDK_VERSION = 35
43+
MIN_SDK_VERSION = 29
44+
SAMPLE_MIN_SDK_VERSION = 29
4445

4546
# Gradle parameters
4647
org.gradle.daemon = true
47-
org.gradle.jvmargs = -XX:MaxPermSize=1024m -XX:+CMSClassUnloadingEnabled -XX:+HeapDumpOnOutOfMemoryError -Xmx2048m
48+
#org.gradle.jvmargs = -XX:MaxPermSize=1024m -XX:+CMSClassUnloadingEnabled -XX:+HeapDumpOnOutOfMemoryError -Xmx2048m
4849

4950
# AndroidX
5051
android.useAndroidX = true
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
#Fri May 02 10:25:49 AZT 2025
12
distributionBase=GRADLE_USER_HOME
23
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
45
zipStoreBase=GRADLE_USER_HOME
56
zipStorePath=wrapper/dists

ktx-sample/build.gradle

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@ android {
1111
versionName "1.0"
1212
}
1313
compileOptions {
14-
sourceCompatibility JavaVersion.VERSION_1_8
15-
targetCompatibility JavaVersion.VERSION_1_8
14+
sourceCompatibility Versions.JAVA_VERSION
15+
targetCompatibility Versions.JAVA_VERSION
1616
}
17+
namespace = "dispatcher.ktx.sample"
1718
}
1819

1920
dependencies {
2021
implementation "org.jetbrains.kotlin:kotlin-stdlib:$KOTLIN_VERSION"
21-
implementation "androidx.appcompat:appcompat:$ANDROIDX_LIBRARY_VERSION"
22+
implementation "androidx.appcompat:appcompat:$ANDROIDX_APPCOMPAT_VERSION"
2223
implementation project(':ktx')
2324
}

ktx/build.gradle

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,39 @@
11
apply plugin: 'com.android.library'
22
apply plugin: 'kotlin-android'
33
apply plugin: 'org.jetbrains.dokka'
4-
apply plugin: "com.vanniktech.maven.publish"
4+
//apply plugin: "com.vanniktech.maven.publish"
55

66
android {
77
compileSdkVersion COMPILE_SDK_VERSION
8+
89
defaultConfig {
910
minSdkVersion MIN_SDK_VERSION
1011
targetSdkVersion TARGET_SDK_VERSION
1112
}
1213

13-
libraryVariants.all {
14-
it.generateBuildConfigProvider.configure { enabled = false }
15-
}
16-
}
14+
// afterEvaluate {
15+
// libraryVariants.all {
16+
// it.generateBuildConfigProvider.configure { enabled = false }
17+
// }
18+
// }
1719

18-
dependencies {
19-
api "com.github.permissions-dispatcher:permissionsdispatcher:4.8.0"
20+
namespace = "permissions.dispatcher.ktx"
2021

21-
implementation "androidx.core:core:$ANDROIDX_LIBRARY_VERSION"
22-
implementation "androidx.appcompat:appcompat:$ANDROIDX_LIBRARY_VERSION"
23-
implementation "androidx.fragment:fragment:$ANDROIDX_LIBRARY_VERSION"
24-
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$LIFECYCLE_VERSION"
25-
implementation "androidx.collection:collection:$ANDROIDX_LIBRARY_VERSION"
26-
implementation "org.jetbrains.kotlin:kotlin-stdlib:$KOTLIN_VERSION"
22+
dependencies {
23+
api project(":library")
2724

28-
testImplementation "junit:junit:$JUNIT_VERSION"
29-
testImplementation "androidx.test:core:1.3.0-rc01"
30-
testImplementation "androidx.test.ext:junit:1.1.2-rc01"
31-
testImplementation "androidx.test:runner:1.3.0-rc01"
32-
testImplementation "android.arch.core:core-testing:$ARC_TESTING_VERSION"
33-
testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:$MOCKITO_KOTLIN_VERSION"
34-
}
25+
implementation "androidx.core:core:$ANDROIDX_LIBRARY_VERSION"
26+
implementation "androidx.appcompat:appcompat:$ANDROIDX_APPCOMPAT_VERSION"
27+
implementation "androidx.fragment:fragment:$ANDROIDX_FRAGMENT_VERSION"
28+
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$LIFECYCLE_VERSION"
29+
// implementation "androidx.collection:collection:$ANDROIDX_LIBRARY_VERSION"
30+
implementation "org.jetbrains.kotlin:kotlin-stdlib:$KOTLIN_VERSION"
31+
32+
testImplementation "junit:junit:$JUNIT_VERSION"
33+
testImplementation "androidx.test:core:1.3.0-rc01"
34+
testImplementation "androidx.test.ext:junit:1.1.2-rc01"
35+
testImplementation "androidx.test:runner:1.3.0-rc01"
36+
// testImplementation "android.arch.core:core-testing:$ARC_TESTING_VERSION"
37+
// testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:$MOCKITO_KOTLIN_VERSION"
38+
}
39+
}

ktx/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<manifest package="permissions.dispatcher.ktx"/>
1+
<manifest />

library/build.gradle

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,49 +2,52 @@ apply plugin: 'com.android.library'
22
apply plugin: "com.vanniktech.maven.publish"
33

44
android {
5+
namespace = "permissions.dispatcher.library"
6+
57
compileSdkVersion COMPILE_SDK_VERSION
8+
69
defaultConfig {
710
minSdkVersion MIN_SDK_VERSION
811
targetSdkVersion TARGET_SDK_VERSION
912
}
1013

1114
compileOptions {
12-
sourceCompatibility JavaVersion.VERSION_1_6
13-
targetCompatibility JavaVersion.VERSION_1_6
15+
sourceCompatibility Versions.JAVA_VERSION
16+
targetCompatibility Versions.JAVA_VERSION
1417
}
1518

1619
packagingOptions {
1720
exclude 'META-INF/services/javax.annotation.processing.Processor'
1821
}
1922

20-
libraryVariants.all {
21-
it.generateBuildConfigProvider.configure { enabled = false }
22-
}
23+
// libraryVariants.all {
24+
// it.generateBuildConfigProvider.configure { enabled = false }
25+
// }
2326
}
2427

2528
configurations {
2629
lintChecks
2730
}
2831

2932
dependencies {
30-
implementation "androidx.core:core:$ANDROIDX_LIBRARY_VERSION"
31-
implementation "androidx.fragment:fragment:$ANDROIDX_LIBRARY_VERSION"
32-
implementation "androidx.collection:collection:$ANDROIDX_LIBRARY_VERSION"
33+
implementation "androidx.core:core:1.16.0"
34+
implementation "androidx.fragment:fragment:$ANDROIDX_FRAGMENT_VERSION"
35+
// implementation "androidx.collection:collection:$ANDROIDX_LIBRARY_VERSION"
3336

3437
testImplementation "junit:junit:$JUNIT_VERSION"
35-
testImplementation "org.mockito:mockito-core:$MOCKITO_VERSION"
38+
testImplementation "org.mockito:mockito-core:$MOCKITO_KOTLIN_VERSION"
3639
testImplementation "org.powermock:powermock-api-mockito2:$POWERMOCK_VERSION"
3740
testImplementation "org.powermock:powermock-module-junit4:$POWERMOCK_VERSION"
3841

3942
api project(path: ':annotation')
40-
lintChecks project(path: ':lint', configuration: 'lintChecks')
43+
// lintChecks project(path: ':lint', configuration: 'lintChecks')
4144
}
4245

43-
task copyLintJar(type: Copy) {
44-
from(configurations.lintChecks) {
46+
tasks.register("copyLintJar", Copy) {
47+
it.from(configurations.lintChecks) {
4548
rename { 'lint.jar' }
4649
}
47-
into 'build/intermediates/lint/'
50+
it.into 'build/intermediates/lint/'
4851
}
4952

5053
project.afterEvaluate {

library/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<manifest package="permissions.dispatcher"/>
1+
<manifest />

library/src/main/java/permissions/dispatcher/PermissionUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public final class PermissionUtils {
1717
private static final SimpleArrayMap<String, Integer> MIN_SDK_PERMISSIONS;
1818

1919
static {
20-
MIN_SDK_PERMISSIONS = new SimpleArrayMap<String, Integer>(13);
20+
MIN_SDK_PERMISSIONS = new SimpleArrayMap<>(13);
2121
MIN_SDK_PERMISSIONS.put("com.android.voicemail.permission.ADD_VOICEMAIL", 14);
2222
MIN_SDK_PERMISSIONS.put("android.permission.READ_CALL_LOG", 16);
2323
MIN_SDK_PERMISSIONS.put("android.permission.READ_EXTERNAL_STORAGE", 16);

lint/build.gradle

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
11
apply plugin: 'java'
22
apply plugin: 'kotlin'
33

4-
targetCompatibility = JavaVersion.VERSION_1_6
5-
sourceCompatibility = JavaVersion.VERSION_1_6
4+
java {
5+
sourceCompatibility Versions.JAVA_VERSION
6+
targetCompatibility Versions.JAVA_VERSION
7+
}
68

79
configurations {
810
lintChecks
911
}
1012

1113
dependencies {
12-
implementation "com.android.tools.lint:lint-api:$LINT_VERSION"
13-
implementation "com.android.tools.lint:lint-checks:$LINT_VERSION"
14-
implementation "com.android.tools.lint:lint:$LINT_VERSION"
15-
16-
implementation "androidx.core:core:$ANDROIDX_LIBRARY_VERSION"
17-
implementation "androidx.fragment:fragment:$ANDROIDX_LIBRARY_VERSION"
14+
implementation "com.android.tools.lint:lint-api:31.9.2"
15+
implementation "com.android.tools.lint:lint-checks:31.9.2"
16+
implementation "com.android.tools.lint:lint:31.9.2"
1817

1918
testImplementation "junit:junit:$JUNIT_VERSION"
20-
testImplementation "com.android.tools.lint:lint-tests:$LINT_VERSION"
21-
testImplementation "com.android.tools:testutils:$LINT_VERSION"
19+
testImplementation "com.android.tools.lint:lint-tests:31.9.2"
20+
testImplementation "com.android.tools:testutils:31.9.2"
2221

2322
lintChecks files(jar)
2423
}

processor/build.gradle

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ apply plugin: 'kotlin'
66
apply plugin: 'org.jetbrains.dokka'
77
apply plugin: "com.vanniktech.maven.publish"
88
apply plugin: AndroidJarDependencyPlugin
9-
apply plugin: AarToJarConversionPlugin
9+
//apply plugin: AarToJarConversionPlugin
1010

1111
// Connect sources & tests to library project
12-
convertAarsToJar.dependsOn ":library:assembleRelease"
12+
//convertAarsToJar.dependsOn ":library:assembleRelease"
1313

1414
configurations.all {
1515
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
@@ -27,16 +27,15 @@ dependencies {
2727
implementation "com.squareup:kotlinpoet:$KOTLINPOET_VERSION"
2828
implementation project(path: ':annotation')
2929

30-
testCompileAar "androidx.legacy:legacy-support-v4:$ANDROIDX_LIBRARY_VERSION"
31-
testCompileAar project(path: ":library", configuration: "default")
30+
// testCompileAar "androidx.legacy:legacy-support-v4:$ANDROIDX_LIBRARY_VERSION"
31+
// testCompileAar project(path: ":library", configuration: "default")
3232

33-
testImplementation androidJar()
34-
testImplementation files(Jvm.current().getToolsJar())
33+
// testImplementation androidJar()
3534
testImplementation "junit:junit:$JUNIT_VERSION"
36-
testImplementation "org.mockito:mockito-core:$MOCKITO_VERSION"
35+
testImplementation "org.mockito:mockito-core:$MOCKITO_KOTLIN_VERSION"
3736
testImplementation "com.google.testing.compile:compile-testing:$COMPILE_TESTING_VERSION"
3837
testImplementation "commons-io:commons-io:$COMMONS_IO_VERSION"
3938
testImplementation "com.squareup.okio:okio:2.1.0"
40-
testImplementation "androidx.legacy:legacy-support-v4:$ANDROIDX_LIBRARY_VERSION"
39+
// testImplementation "androidx.legacy:legacy-support-v4:$ANDROIDX_LIBRARY_VERSION"
4140
testImplementation "com.github.permissions-dispatcher:kompile-testing:$KOMPILE_TESTING_VERSION"
4241
}

0 commit comments

Comments
 (0)