Skip to content

Commit

Permalink
Migrate to AndroidX
Browse files Browse the repository at this point in the history
  • Loading branch information
Kiryl Rozau committed Mar 8, 2019
1 parent 62e4730 commit af3749f
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 24 deletions.
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ buildscript {
}

ext {
androidSupportLib = '28.0.0'
libraryVersion = '28.0.0'
androidXAnnotationsVersion = '1.0.2'
androidXAppCompatVersion = '1.0.2'

minSdkVersion = 14
compileSdkVersion = 28
Expand All @@ -30,7 +30,7 @@ ext {
}

group = 'by.kirich1409'
version = ext.libraryVersion
version = ext.versionName

allprojects {
repositories {
Expand Down
2 changes: 1 addition & 1 deletion sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ android {
}

dependencies {
implementation "com.android.support:appcompat-v7:$androidSupportLib"
implementation "androidx.appcompat:appcompat:$androidXAppCompatVersion"
implementation project(':strict-mode-compat')
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package com.kirillr.application;

import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

import com.kirillr.strictmodehelper.StrictModeCompat;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity {

@Override
Expand Down
2 changes: 1 addition & 1 deletion strict-mode-compat-kotlin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode rootProject.ext.versionCode
versionName rootProject.ext.libraryVersion
versionName rootProject.ext.versionName
}
}

Expand Down
12 changes: 3 additions & 9 deletions strict-mode-compat-kotlin/publish.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
group = 'com.kirich1409'
version = rootProject.ext.libraryVersion
version = rootProject.ext.versionName

apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'

def siteUrl = 'https://github.com/kirich1409/StrictModeCompat'
def gitRepoUrl = 'https://github.com/kirich1409/StrictModeCompat.git'

task sourcesJar(type: Jar) {
def sourcesJar = tasks.register("sourcesJar", Jar) {
archiveClassifier.set('sources')
from android.sourceSets.main.java.srcDirs
}
Expand All @@ -16,12 +16,6 @@ artifacts {
archives sourcesJar
}

task findConventions {
doLast {
println project.getConvention()
}
}

bintray {
user = project.hasProperty('user') ? project.property('user') : System.getenv('BINTRAY_USER')
key = project.hasProperty('apiKey') ? project.property('apiKey') : System.getenv('BINTRAY_API_KEY')
Expand All @@ -44,7 +38,7 @@ bintray {
githubReleaseNotesFile = 'README.md' //Optional Github readme file

version {
name = rootProject.ext.libraryVersion
name = rootProject.ext.versionName
desc = 'Android StrictMode Compat on Kotlin'
released = new Date()
}
Expand Down
4 changes: 2 additions & 2 deletions strict-mode-compat/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode rootProject.ext.versionCode
versionName rootProject.ext.libraryVersion
versionName rootProject.ext.versionName
}

buildTypes {
Expand All @@ -27,7 +27,7 @@ android {
apply from: 'publish.gradle'

dependencies {
implementation "com.android.support:support-annotations:$androidSupportLib"
implementation "androidx.annotation:annotation:$androidXAnnotationsVersion"
}

tasks.withType(Class.forName("com.android.build.gradle.tasks.GenerateBuildConfig")) {
Expand Down
18 changes: 15 additions & 3 deletions strict-mode-compat/publish.gradle
Original file line number Diff line number Diff line change
@@ -1,19 +1,31 @@
group = 'com.kirich1409'
version = rootProject.ext.libraryVersion
version = rootProject.ext.versionName

apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'

def siteUrl = 'https://github.com/kirich1409/StrictModeCompat'
def gitRepoUrl = 'https://github.com/kirich1409/StrictModeCompat.git'

task sourcesJar(type: Jar) {
def sourcesJar = tasks.register("sourcesJar", Jar) {
archiveClassifier.set('sources')
from android.sourceSets.main.java.srcDirs
}

def javadoc = tasks.register("javadoc", Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}

def javadocJar = tasks.register("javadocJar", Jar) {
dependsOn javadoc
archiveClassifier.set('javadoc')
from javadoc.get().destinationDir
}

artifacts {
archives sourcesJar
// archives javadocJar
}

bintray {
Expand All @@ -38,7 +50,7 @@ bintray {
githubReleaseNotesFile = 'README.md' //Optional Github readme file

version {
name = rootProject.ext.libraryVersion
name = rootProject.ext.versionName
desc = 'Android StrictMode Compat Library'
released = new Date()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,16 @@
import android.os.DropBoxManager;
import android.os.StrictMode;
import android.os.strictmode.Violation;
import android.support.annotation.IntRange;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.Log;

import java.io.Closeable;
import java.util.Locale;
import java.util.concurrent.Executor;

import androidx.annotation.IntRange;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

public final class StrictModeCompat {

private final static String TAG = "StrictModeCompat";
Expand Down

0 comments on commit af3749f

Please sign in to comment.