From 69d6d24a72bc2712094a784e5acf96378119db34 Mon Sep 17 00:00:00 2001 From: nuclearfog Date: Thu, 21 Oct 2021 10:39:09 +0200 Subject: [PATCH] gradle update, JitPack fix --- build.gradle | 7 ++-- gradle/wrapper/gradle-wrapper.properties | 2 +- jitpack.yml | 2 ++ module/build.gradle | 34 ++++++++++++++----- .../textviewtool/LinkAndScrollMovement.java | 6 +++- 5 files changed, 35 insertions(+), 16 deletions(-) create mode 100644 jitpack.yml diff --git a/build.gradle b/build.gradle index 645e8f3..87e7f02 100644 --- a/build.gradle +++ b/build.gradle @@ -1,24 +1,21 @@ buildscript { repositories { google() - jcenter() mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:4.1.1' + classpath 'com.android.tools.build:gradle:7.0.3' } } - allprojects { repositories { google() - jcenter() + mavenCentral() } } - task clean(type: Delete) { delete rootProject.buildDir } \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 4d9ca16..ffed3a2 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/jitpack.yml b/jitpack.yml new file mode 100644 index 0000000..44497b8 --- /dev/null +++ b/jitpack.yml @@ -0,0 +1,2 @@ +jdk: + -openjdk11 diff --git a/module/build.gradle b/module/build.gradle index 5022e7c..26ba4e7 100644 --- a/module/build.gradle +++ b/module/build.gradle @@ -1,20 +1,36 @@ -apply plugin: 'com.android.library' -apply plugin: 'maven' - -group 'com.github.nuclearfog' +plugins { + id 'com.android.library' + id 'maven-publish' +} android { compileSdkVersion 30 - buildToolsVersion '30.0.3' defaultConfig { minSdkVersion 16 targetSdkVersion 30 - versionCode 5 - versionName "1.4" } - buildTypes { } + buildTypes { + release { + minifyEnabled false + } + } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } } -dependencies { +afterEvaluate { + publishing { + publications { + release(MavenPublication) { + from components.release + groupId 'com.github.nuclearfog' + artifactId 'LinkAndScrollMovement' + version '1.4.1' + } + } + } } \ No newline at end of file diff --git a/module/src/main/java/org/nuclearfog/textviewtool/LinkAndScrollMovement.java b/module/src/main/java/org/nuclearfog/textviewtool/LinkAndScrollMovement.java index 0d40773..59e55e8 100644 --- a/module/src/main/java/org/nuclearfog/textviewtool/LinkAndScrollMovement.java +++ b/module/src/main/java/org/nuclearfog/textviewtool/LinkAndScrollMovement.java @@ -16,7 +16,8 @@ * While scrolling a TextView, the spans stay locked until the next tap event. * * @author nuclearfog - * @version 1.4 + * @version 1.4.1 + * @since 1.0 */ public class LinkAndScrollMovement extends ScrollingMovementMethod { @@ -38,6 +39,8 @@ public class LinkAndScrollMovement extends ScrollingMovementMethod { private int xScroll = 0; private int yScroll = 0; + /** + */ private LinkAndScrollMovement() { super(); } @@ -78,6 +81,7 @@ public boolean onTouchEvent(TextView widget, Spannable buffer, MotionEvent event /** * sets maximum threshold to lock link clicks + * * @param thrX threshold for x axis * @param thrY threshold for y axis */