From 9d41370c5bfd47d152008366bc6d03c451b5bca1 Mon Sep 17 00:00:00 2001 From: zhwanng <48609908+zhwanng@users.noreply.github.com> Date: Wed, 2 Aug 2023 15:13:47 +0800 Subject: [PATCH] update jitpack --- app/build.gradle | 10 ++++----- build.gradle | 15 ++++++++++++-- emoji/build.gradle | 11 +++++----- gradle/wrapper/gradle-wrapper.properties | 3 ++- jitpack.yml | 6 ++++++ library/build.gradle | 26 ++++++++++++++++-------- 6 files changed, 49 insertions(+), 22 deletions(-) create mode 100644 jitpack.yml diff --git a/app/build.gradle b/app/build.gradle index 4967fef..bf973da 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,12 +1,13 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 33 + compileSdkVersion rootProject.ext.compileSdkVersion defaultConfig { applicationId "br.tiagohm.markdownview.app" - minSdkVersion 16 - targetSdkVersion 31 + + minSdk rootProject.ext.minSdkVersion + targetSdk rootProject.ext.targetSdkVersion versionCode 1 versionName "1.0" testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' @@ -26,8 +27,7 @@ dependencies { implementation project(path: ':emoji') implementation project(path: ':library') - final def x_version = '1.5.0' - implementation "androidx.appcompat:appcompat:$x_version" + implementation "androidx.appcompat:appcompat:$rootProject.ext.appcompat" testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test.ext:junit:1.1.1' diff --git a/build.gradle b/build.gradle index a846ddf..393eb2c 100644 --- a/build.gradle +++ b/build.gradle @@ -2,8 +2,9 @@ buildscript { repositories { - jcenter() google() + mavenCentral() + maven { url 'https://jitpack.io' } } dependencies { classpath 'com.android.tools.build:gradle:7.2.2' @@ -15,11 +16,21 @@ buildscript { allprojects { repositories { - jcenter() google() + mavenCentral() + maven { url 'https://jitpack.io' } } } + +ext { + compileSdkVersion = 33 + minSdkVersion = 26 + targetSdkVersion = 30 + buildToolsVersion = '30.0.3' + appcompat = '1.5.0' +} + task clean(type: Delete) { delete rootProject.buildDir } diff --git a/emoji/build.gradle b/emoji/build.gradle index eb5b59b..5504bac 100644 --- a/emoji/build.gradle +++ b/emoji/build.gradle @@ -1,14 +1,15 @@ -apply plugin: 'com.android.library' -apply plugin: 'maven-publish' +plugins { + id 'com.android.library' +} group = 'com.github.haiwen' android { - compileSdkVersion 27 + compileSdkVersion rootProject.ext.compileSdkVersion defaultConfig { - minSdkVersion 16 - targetSdkVersion 27 + minSdk rootProject.ext.minSdkVersion + targetSdk rootProject.ext.targetSdkVersion versionCode 1 versionName "1.0" diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 565a7e7..787ecb4 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ -#Wed Aug 02 13:27:22 CST 2023 +#Wed Aug 02 14:49:14 CST 2023 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists +org.gradle.caching=false \ No newline at end of file diff --git a/jitpack.yml b/jitpack.yml new file mode 100644 index 0000000..238fb94 --- /dev/null +++ b/jitpack.yml @@ -0,0 +1,6 @@ +before_install: + - sdk install java 11.0.10-open + - sdk use java 11.0.10-open + +jdk: + - openjdk11 diff --git a/library/build.gradle b/library/build.gradle index 5e325bf..2bc1f13 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -1,16 +1,19 @@ -apply plugin: 'com.android.library' -apply plugin: 'maven-publish' +plugins { + id 'com.android.library' + id 'maven-publish' +} -group = 'com.github.haiwen' -def libVersion = "0.19.3" +def group = 'com.github.haiwen' +def libVersion = "0.19.4" +def libCode = 4 android { - compileSdkVersion 33 + compileSdkVersion rootProject.ext.compileSdkVersion defaultConfig { - minSdkVersion 16 - targetSdkVersion 31 - versionCode 1 + minSdk rootProject.ext.minSdkVersion + targetSdk rootProject.ext.targetSdkVersion + versionCode libCode versionName libVersion testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' @@ -22,6 +25,11 @@ android { proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } } dependencies { @@ -51,7 +59,7 @@ afterEvaluate { publications { release(MavenPublication) { from components.release - groupId = 'com.github.haiwen' + groupId = group artifactId = 'MarkdownView' version = libVersion }