googlesamples / easypermissions

Simplify Android M system permissions
https://firebaseopensource.com/projects/googlesamples/easypermissions/
Apache License 2.0
9.87k stars 1.46k forks source link

Migrate to AndroidX #272

Closed samtstern closed 5 years ago

samtstern commented 5 years ago

@SUPERCILEX do you have any experience converting a library to AndroidX? This is my first go at it and I am sure it's a minefield.

samtstern commented 5 years ago

@henriquenfaria what do you think?

Also this would be version 3.0.0, is there anything else we should break while we have the chance?

samtstern commented 5 years ago

Just for clarity, here's what the 3.0 pom would look like:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>pub.devrel</groupId>
  <artifactId>easypermissions</artifactId>
  <version>3.0.0-SNAPSHOT</version>
  <packaging>aar</packaging>
  <name>EasyPermissions</name>
  <description>A wrapper library for basic Android M system permissions logic</description>
  <url>https://github.com/googlesamples/easypermissions</url>
  <inceptionYear>2015</inceptionYear>
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <developers>
    <developer>
      <name>Google</name>
    </developer>
  </developers>
  <scm>
    <connection>https://github.com/googlesamples/easypermissions.git</connection>
    <url>https://github.com/googlesamples/easypermissions</url>
  </scm>
  <dependencies>
    <dependency>
      <groupId>androidx.appcompat</groupId>
      <artifactId>appcompat</artifactId>
      <version>1.0.2</version>
    </dependency>
    <dependency>
      <groupId>androidx.core</groupId>
      <artifactId>core</artifactId>
      <version>1.0.1</version>
    </dependency>
    <dependency>
      <groupId>androidx.fragment</groupId>
      <artifactId>fragment</artifactId>
      <version>1.0.0</version>
    </dependency>
  </dependencies>
</project>
nimamoradi commented 5 years ago

I ran to problem to this error in andriodx, from 3.0 pom it issus from this commit.

[ERROR: Failed to resolve: fragment
Affected Modules: app

ERROR: Failed to resolve: core
Affected Modules: app](url)

my gradle file is this:

implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.core:core-ktx:1.1.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.2.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'

    implementation 'io.reactivex.rxjava2:rxjava:2.0.5'
    implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'

    implementation('io.socket:socket.io-client:1.0.0') {
        exclude group: 'org.json', module: 'json'
    }
    implementation "com.google.android.material:material:1.0.0"
    implementation "androidx.legacy:legacy-support-v4:1.0.0"
    implementation 'org.webrtc:google-webrtc:1.0.28513'

    implementation 'com.myhexaville:smart-image-picker:1.0.4'

and i have added google() dependency in the project gradle

Duresa6 commented 2 months ago

@