Skip to content

Dependencies Update #791

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions annotation/build.gradle

This file was deleted.

6 changes: 6 additions & 0 deletions annotation/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
plugins {
`java-library`
id("com.vanniktech.maven.publish")
}
//apply plugin: 'java-library'
//apply plugin: "com.vanniktech.maven.publish"
24 changes: 12 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
buildscript {
repositories {
google {
content {
includeGroupByRegex("com\\.android.*")
includeGroupByRegex("com\\.google.*")
includeGroupByRegex("androidx.*")
}
}
mavenCentral()
google()
jcenter()
gradlePluginPortal()
maven {
url = uri("https://jitpack.io")
}
}

dependencies {
classpath "com.android.tools.build:gradle:$GRADLE_PLUGIN_VERSION"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$KOTLIN_VERSION"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:$DOKKA_VERSION"
classpath "com.vanniktech:gradle-maven-publish-plugin:$PUBLISH_PLUGIN_VERSION"
}
}

allprojects {
repositories {
mavenCentral()
google()
jcenter()
// TODO: remove after publishing kompile-testing to Maven Central
maven { url 'https://jitpack.io' }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import org.gradle.api.DefaultTask
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.file.FileCollection
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.InputFile
import org.gradle.api.tasks.OutputDirectory
import org.gradle.api.tasks.TaskAction

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

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

static class ConvertAarToJarTask extends DefaultTask {

@Input
@InputFile
FileCollection inputFiles

@OutputDirectory
Expand Down
7 changes: 7 additions & 0 deletions buildSrc/src/main/groovy/permissions/dispatcher/Versions.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import org.gradle.api.JavaVersion;


public class Versions {

public static final JavaVersion JAVA_VERSION = JavaVersion.VERSION_21;
}
59 changes: 30 additions & 29 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Upload configuration
USER = hotchemi
USER = muradeliyev
GROUP = com.github.permissions-dispatcher
VERSION_NAME = 4.10.0-SNAPSHOT
VERSION_NAME = 5.0.0
POM_NAME = PermissionsDispatcher
POM_DESCRIPTION = A declarative API to handle Android runtime permissions.
POM_INCEPTION_YEAR = 2015
Expand All @@ -11,40 +11,41 @@ POM_SCM_CONNECTION = https://github.com/permissions-dispatcher/PermissionsD
POM_LICENCE_NAME = The Apache Software License, Version 2.0
POM_LICENCE_URL = https://www.apache.org/licenses/LICENSE-2.0.txt
POM_LICENCE_DIST = repo
POM_DEVELOPER_ID = hotchemi
POM_DEVELOPER_NAME = Shintaro Katafuchi
POM_DEVELOPER_URL = https://github.com/hotchemi
POM_DEVELOPER_ID = muradeliyev
POM_DEVELOPER_NAME = Murad Aliyev
POM_DEVELOPER_URL = https://github.com/muradeliyev

# Plugin versions
DOKKA_VERSION = 1.4.20
PUBLISH_PLUGIN_VERSION = 0.18.0
GRADLE_PLUGIN_VERSION = 4.2.0
KOTLIN_VERSION = 1.5.20
KOTLIN_METADATA_VERSION = 0.3.0
ANDROIDX_LIBRARY_VERSION= 1.0.0
LIFECYCLE_VERSION = 2.2.0
ARC_TESTING_VERSION = 1.1.1
JAVAPOET_VERSION = 1.9.0
KOTLINPOET_VERSION = 1.3.0
JUNIT_VERSION = 4.12
MOCKITO_VERSION = 2.28.2
MOCKITO_KOTLIN_VERSION = 2.2.0
POWERMOCK_VERSION = 2.0.2
COMPILE_TESTING_VERSION = 0.12
LINT_VERSION = 26.3.2
ROBOLECTRIC_VERSION = 3.3.2
COMMONS_IO_VERSION = 2.6
KOMPILE_TESTING_VERSION = 0.1.4
DOKKA_VERSION = 2.0.0
PUBLISH_PLUGIN_VERSION = 0.31.0
GRADLE_PLUGIN_VERSION = 8.6.0
KOTLIN_VERSION = 2.1.20
KOTLIN_METADATA_VERSION = 0.5.0
ANDROIDX_LIBRARY_VERSION= 1.9.1
ANDROIDX_APPCOMPAT_VERSION = 1.7.0
ANDROIDX_FRAGMENT_VERSION = 1.8.3
LIFECYCLE_VERSION = 2.9.0-alpha03
ARC_TESTING_VERSION = 2.0.0
JAVAPOET_VERSION = 1.13.0
KOTLINPOET_VERSION = 2.1.0
JUNIT_VERSION = 4.13.2
MOCKITO_KOTLIN_VERSION = 5.4.0
POWERMOCK_VERSION = 2.0.9
COMPILE_TESTING_VERSION = 0.21.0
LINT_VERSION = 30.3.2
ROBOLECTRIC_VERSION = 4.10.3
COMMONS_IO_VERSION = 2.13.0
KOMPILE_TESTING_VERSION = 0.1.3

# Android configuration
COMPILE_SDK_VERSION = android-29
TARGET_SDK_VERSION = 29
MIN_SDK_VERSION = 14
SAMPLE_MIN_SDK_VERSION = 16
COMPILE_SDK_VERSION = android-35
TARGET_SDK_VERSION = 35
MIN_SDK_VERSION = 29
SAMPLE_MIN_SDK_VERSION = 29

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

# AndroidX
android.useAndroidX = true
Expand Down
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#Fri May 02 10:25:49 AZT 2025
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
7 changes: 4 additions & 3 deletions ktx-sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ android {
versionName "1.0"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility Versions.JAVA_VERSION
targetCompatibility Versions.JAVA_VERSION
}
namespace = "dispatcher.ktx.sample"
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$KOTLIN_VERSION"
implementation "androidx.appcompat:appcompat:$ANDROIDX_LIBRARY_VERSION"
implementation "androidx.appcompat:appcompat:$ANDROIDX_APPCOMPAT_VERSION"
implementation project(':ktx')
}
45 changes: 25 additions & 20 deletions ktx/build.gradle
Original file line number Diff line number Diff line change
@@ -1,34 +1,39 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'org.jetbrains.dokka'
apply plugin: "com.vanniktech.maven.publish"
//apply plugin: "com.vanniktech.maven.publish"

android {
compileSdkVersion COMPILE_SDK_VERSION

defaultConfig {
minSdkVersion MIN_SDK_VERSION
targetSdkVersion TARGET_SDK_VERSION
}

libraryVariants.all {
it.generateBuildConfigProvider.configure { enabled = false }
}
}
// afterEvaluate {
// libraryVariants.all {
// it.generateBuildConfigProvider.configure { enabled = false }
// }
// }

dependencies {
api "com.github.permissions-dispatcher:permissionsdispatcher:4.8.0"
namespace = "permissions.dispatcher.ktx"

implementation "androidx.core:core:$ANDROIDX_LIBRARY_VERSION"
implementation "androidx.appcompat:appcompat:$ANDROIDX_LIBRARY_VERSION"
implementation "androidx.fragment:fragment:$ANDROIDX_LIBRARY_VERSION"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$LIFECYCLE_VERSION"
implementation "androidx.collection:collection:$ANDROIDX_LIBRARY_VERSION"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$KOTLIN_VERSION"
dependencies {
api project(":library")

testImplementation "junit:junit:$JUNIT_VERSION"
testImplementation "androidx.test:core:1.3.0-rc01"
testImplementation "androidx.test.ext:junit:1.1.2-rc01"
testImplementation "androidx.test:runner:1.3.0-rc01"
testImplementation "android.arch.core:core-testing:$ARC_TESTING_VERSION"
testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:$MOCKITO_KOTLIN_VERSION"
}
implementation "androidx.core:core:$ANDROIDX_LIBRARY_VERSION"
implementation "androidx.appcompat:appcompat:$ANDROIDX_APPCOMPAT_VERSION"
implementation "androidx.fragment:fragment:$ANDROIDX_FRAGMENT_VERSION"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$LIFECYCLE_VERSION"
// implementation "androidx.collection:collection:$ANDROIDX_LIBRARY_VERSION"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$KOTLIN_VERSION"

testImplementation "junit:junit:$JUNIT_VERSION"
testImplementation "androidx.test:core:1.3.0-rc01"
testImplementation "androidx.test.ext:junit:1.1.2-rc01"
testImplementation "androidx.test:runner:1.3.0-rc01"
// testImplementation "android.arch.core:core-testing:$ARC_TESTING_VERSION"
// testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:$MOCKITO_KOTLIN_VERSION"
}
}
2 changes: 1 addition & 1 deletion ktx/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<manifest package="permissions.dispatcher.ktx"/>
<manifest />
29 changes: 16 additions & 13 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,49 +2,52 @@ apply plugin: 'com.android.library'
apply plugin: "com.vanniktech.maven.publish"

android {
namespace = "permissions.dispatcher.library"

compileSdkVersion COMPILE_SDK_VERSION

defaultConfig {
minSdkVersion MIN_SDK_VERSION
targetSdkVersion TARGET_SDK_VERSION
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_6
targetCompatibility JavaVersion.VERSION_1_6
sourceCompatibility Versions.JAVA_VERSION
targetCompatibility Versions.JAVA_VERSION
}

packagingOptions {
exclude 'META-INF/services/javax.annotation.processing.Processor'
}

libraryVariants.all {
it.generateBuildConfigProvider.configure { enabled = false }
}
// libraryVariants.all {
// it.generateBuildConfigProvider.configure { enabled = false }
// }
}

configurations {
lintChecks
}

dependencies {
implementation "androidx.core:core:$ANDROIDX_LIBRARY_VERSION"
implementation "androidx.fragment:fragment:$ANDROIDX_LIBRARY_VERSION"
implementation "androidx.collection:collection:$ANDROIDX_LIBRARY_VERSION"
implementation "androidx.core:core:1.16.0"
implementation "androidx.fragment:fragment:$ANDROIDX_FRAGMENT_VERSION"
// implementation "androidx.collection:collection:$ANDROIDX_LIBRARY_VERSION"

testImplementation "junit:junit:$JUNIT_VERSION"
testImplementation "org.mockito:mockito-core:$MOCKITO_VERSION"
testImplementation "org.mockito:mockito-core:$MOCKITO_KOTLIN_VERSION"
testImplementation "org.powermock:powermock-api-mockito2:$POWERMOCK_VERSION"
testImplementation "org.powermock:powermock-module-junit4:$POWERMOCK_VERSION"

api project(path: ':annotation')
lintChecks project(path: ':lint', configuration: 'lintChecks')
// lintChecks project(path: ':lint', configuration: 'lintChecks')
}

task copyLintJar(type: Copy) {
from(configurations.lintChecks) {
tasks.register("copyLintJar", Copy) {
it.from(configurations.lintChecks) {
rename { 'lint.jar' }
}
into 'build/intermediates/lint/'
it.into 'build/intermediates/lint/'
}

project.afterEvaluate {
Expand Down
2 changes: 1 addition & 1 deletion library/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<manifest package="permissions.dispatcher"/>
<manifest />
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public final class PermissionUtils {
private static final SimpleArrayMap<String, Integer> MIN_SDK_PERMISSIONS;

static {
MIN_SDK_PERMISSIONS = new SimpleArrayMap<String, Integer>(13);
MIN_SDK_PERMISSIONS = new SimpleArrayMap<>(13);
MIN_SDK_PERMISSIONS.put("com.android.voicemail.permission.ADD_VOICEMAIL", 14);
MIN_SDK_PERMISSIONS.put("android.permission.READ_CALL_LOG", 16);
MIN_SDK_PERMISSIONS.put("android.permission.READ_EXTERNAL_STORAGE", 16);
Expand Down
19 changes: 9 additions & 10 deletions lint/build.gradle
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
apply plugin: 'java'
apply plugin: 'kotlin'

targetCompatibility = JavaVersion.VERSION_1_6
sourceCompatibility = JavaVersion.VERSION_1_6
java {
sourceCompatibility Versions.JAVA_VERSION
targetCompatibility Versions.JAVA_VERSION
}

configurations {
lintChecks
}

dependencies {
implementation "com.android.tools.lint:lint-api:$LINT_VERSION"
implementation "com.android.tools.lint:lint-checks:$LINT_VERSION"
implementation "com.android.tools.lint:lint:$LINT_VERSION"

implementation "androidx.core:core:$ANDROIDX_LIBRARY_VERSION"
implementation "androidx.fragment:fragment:$ANDROIDX_LIBRARY_VERSION"
implementation "com.android.tools.lint:lint-api:31.9.2"
implementation "com.android.tools.lint:lint-checks:31.9.2"
implementation "com.android.tools.lint:lint:31.9.2"

testImplementation "junit:junit:$JUNIT_VERSION"
testImplementation "com.android.tools.lint:lint-tests:$LINT_VERSION"
testImplementation "com.android.tools:testutils:$LINT_VERSION"
testImplementation "com.android.tools.lint:lint-tests:31.9.2"
testImplementation "com.android.tools:testutils:31.9.2"

lintChecks files(jar)
}
Expand Down
15 changes: 7 additions & 8 deletions processor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ apply plugin: 'kotlin'
apply plugin: 'org.jetbrains.dokka'
apply plugin: "com.vanniktech.maven.publish"
apply plugin: AndroidJarDependencyPlugin
apply plugin: AarToJarConversionPlugin
//apply plugin: AarToJarConversionPlugin

// Connect sources & tests to library project
convertAarsToJar.dependsOn ":library:assembleRelease"
//convertAarsToJar.dependsOn ":library:assembleRelease"

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

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

testImplementation androidJar()
testImplementation files(Jvm.current().getToolsJar())
// testImplementation androidJar()
testImplementation "junit:junit:$JUNIT_VERSION"
testImplementation "org.mockito:mockito-core:$MOCKITO_VERSION"
testImplementation "org.mockito:mockito-core:$MOCKITO_KOTLIN_VERSION"
testImplementation "com.google.testing.compile:compile-testing:$COMPILE_TESTING_VERSION"
testImplementation "commons-io:commons-io:$COMMONS_IO_VERSION"
testImplementation "com.squareup.okio:okio:2.1.0"
testImplementation "androidx.legacy:legacy-support-v4:$ANDROIDX_LIBRARY_VERSION"
// testImplementation "androidx.legacy:legacy-support-v4:$ANDROIDX_LIBRARY_VERSION"
testImplementation "com.github.permissions-dispatcher:kompile-testing:$KOMPILE_TESTING_VERSION"
}
Loading