diff --git a/build.gradle b/build.gradle
index d260497..b6e5501 100644
--- a/build.gradle
+++ b/build.gradle
@@ -5,16 +5,14 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.2'
- classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
- classpath 'com.dicedmelon.gradle:jacoco-android:0.1.4'
}
}
allprojects {
repositories {
google()
- jcenter()
+ mavenCentral()
}
}
diff --git a/gradle.properties b/gradle.properties
index aac7c9b..a13d575 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -15,3 +15,4 @@ org.gradle.jvmargs=-Xmx1536m
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
+android.enableR8=true
\ No newline at end of file
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 96cf2b0..ab82141 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-4.10.3-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-5.3.1-all.zip
diff --git a/sample/.gitignore b/sample/.gitignore
index 796b96d..7b7f1b1 100644
--- a/sample/.gitignore
+++ b/sample/.gitignore
@@ -1 +1,3 @@
/build
+/debug
+/release
diff --git a/sample/build.gradle b/sample/build.gradle
index f3719ae..be9e023 100644
--- a/sample/build.gradle
+++ b/sample/build.gradle
@@ -5,17 +5,17 @@ apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 28
defaultConfig {
- applicationId "com.g00fy2.versioncomparesample"
+ applicationId 'com.g00fy2.versioncomparesample'
minSdkVersion 14
targetSdkVersion 28
versionCode 1
- versionName "1.0"
+ versionName '1.0'
}
buildTypes {
release {
shrinkResources true
minifyEnabled true
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+ proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
sourceSets {
diff --git a/sample/lint.xml b/sample/lint.xml
new file mode 100644
index 0000000..8739658
--- /dev/null
+++ b/sample/lint.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/versioncompare/build.gradle b/versioncompare/build.gradle
index 9ac3fd4..764cd69 100644
--- a/versioncompare/build.gradle
+++ b/versioncompare/build.gradle
@@ -1,13 +1,5 @@
-apply plugin: 'com.android.library'
-apply plugin: 'jacoco-android'
-
-android {
- compileSdkVersion 28
- defaultConfig {
- minSdkVersion 14
- consumerProguardFiles 'proguard-rules.pro'
- }
-}
+apply plugin: 'java-library'
+apply plugin: 'jacoco'
dependencies {
compileOnly 'com.google.code.findbugs:jsr305:3.0.2' // only required at compile time
@@ -16,13 +8,14 @@ dependencies {
}
jacoco {
- toolVersion = "0.8.3"
+ toolVersion = '0.8.3'
}
-jacocoAndroidUnitTestReport {
- csv.enabled false
- html.enabled true
- xml.enabled true
+jacocoTestReport {
+ reports {
+ xml.enabled true
+ csv.enabled false
+ }
}
apply from: 'deploy.gradle'
\ No newline at end of file
diff --git a/versioncompare/deploy.gradle b/versioncompare/deploy.gradle
index dff31b8..bc2c3f8 100644
--- a/versioncompare/deploy.gradle
+++ b/versioncompare/deploy.gradle
@@ -4,7 +4,6 @@ ext {
publishedGroupId = 'com.g00fy2'
libraryName = 'versioncompare'
- artifact = 'versioncompare'
libraryDescription = 'Lightweight library to compare version strings.'
@@ -12,81 +11,63 @@ ext {
issueUrl = 'https://github.com/G00fY2/version-compare/issues'
gitUrl = 'https://github.com/G00fY2/version-compare.git'
- libraryVersion = '1.3.1'
+ libraryVersion = '1.3.2'
developerId = 'g00fy2'
developerName = 'Thomas Wirth'
developerEmail = 't.wirth@appcom-interactive.de'
licenseName = 'The Apache Software License, Version 2.0'
- licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
+ licenseUrl = 'https://www.apache.org/licenses/LICENSE-2.0.txt'
allLicenses = ["Apache-2.0"]
}
// Maven
-apply plugin: 'com.github.dcendents.android-maven'
-
-android.libraryVariants.all { variant ->
- def name = variant.buildType.name.capitalize()
- def task = project.tasks.create "jar${name}", Jar
- task.dependsOn variant.javaCompiler
- task.from variant.javaCompiler.destinationDir
- task.exclude '**/BuildConfig.class'
- task.exclude '**/R.class'
- task.exclude '**/R$*.class'
- artifacts.add('archives', task)
-}
+apply plugin: 'maven-publish'
task sourcesJar(type: Jar) {
- from android.sourceSets.main.java.srcDirs
- classifier = 'sources'
-}
-
-task javadoc(type: Javadoc) {
- source = android.sourceSets.main.java.srcDirs
- classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
+ archiveClassifier = 'sources'
+ from sourceSets.main.allJava
}
-task javadocJar(type: Jar, dependsOn: javadoc) {
- classifier = 'javadoc'
+task javadocJar(type: Jar) {
+ archiveClassifier = 'javadoc'
from javadoc.destinationDir
}
-artifacts {
- archives javadocJar
- archives sourcesJar
-}
-
-install {
- repositories.mavenInstaller {
+publishing {
+ publications {
+ mavenJava(MavenPublication) {
+ artifactId = libraryName
+ groupId = publishedGroupId
+ version = libraryVersion
- pom {
- project {
- packaging 'aar'
- groupId publishedGroupId
- artifactId artifact
+ from components.java
+ artifact sourcesJar
+ artifact javadocJar
- name libraryName
- description libraryDescription
- url siteUrl
+ pom {
+ name = libraryName
+ description = libraryDescription
+ url = siteUrl
licenses {
license {
- name licenseName
- url licenseUrl
+ name = licenseName
+ url = licenseUrl
}
}
developers {
developer {
- id developerId
- name developerName
- email developerEmail
+ id = developerId
+ name = developerName
+ email = developerEmail
}
}
scm {
- connection gitUrl
- developerConnection gitUrl
- url siteUrl
+ connection = gitUrl
+ developerConnection = gitUrl
+ url = siteUrl
}
}
}
@@ -113,7 +94,7 @@ bintray {
name = bintrayName
desc = libraryDescription
websiteUrl = siteUrl
- issueTrackerUrl= issueUrl
+ issueTrackerUrl = issueUrl
vcsUrl = gitUrl
licenses = allLicenses
publicDownloadNumbers = true
diff --git a/versioncompare/src/main/AndroidManifest.xml b/versioncompare/src/main/AndroidManifest.xml
deleted file mode 100644
index 79dc9d3..0000000
--- a/versioncompare/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/versioncompare/proguard-rules.pro b/versioncompare/src/main/resources/META-INF/proguard/versioncompare.pro
similarity index 100%
rename from versioncompare/proguard-rules.pro
rename to versioncompare/src/main/resources/META-INF/proguard/versioncompare.pro