From 78fb6817d3e12c783ab515fecc99cfca584fb59c Mon Sep 17 00:00:00 2001 From: FunkyMuse Date: Tue, 3 Aug 2021 17:50:14 +0200 Subject: [PATCH 1/2] update to 7.0.0 gradle --- app/build.gradle | 3 +- build.gradle | 26 ++++++++++---- gradle/wrapper/gradle-wrapper.properties | 2 +- jitpack.yml | 5 +++ kotlinextensions/build.gradle | 1 - math/build.gradle | 44 ------------------------ viewpager2/build.gradle | 2 +- 7 files changed, 28 insertions(+), 55 deletions(-) create mode 100644 jitpack.yml diff --git a/app/build.gradle b/app/build.gradle index 658fabe43..b01d1989d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -87,7 +87,6 @@ dependencies { implementation 'androidx.vectordrawable:vectordrawable:1.1.0' implementation "androidx.constraintlayout:constraintlayout:$constraint_layout" - implementation "androidx.constraintlayout:constraintlayout-solver:$constraint_layout" //nav implementation "androidx.navigation:navigation-fragment-ktx:$nav_version" @@ -125,4 +124,4 @@ dependencies { kapt "androidx.room:room-compiler:$room_version" -} +} \ No newline at end of file diff --git a/build.gradle b/build.gradle index c7c33a7b7..7cab3dbc3 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { retrofit = "2.9.0" rxBindings = "4.0.0" glide = "4.12.0" - constraint_layout = '2.0.4' + constraint_layout = '2.1.0' coroutines = '1.5.1-native-mt' nav_version = '2.3.5' rx = '3.0.0' @@ -57,22 +57,22 @@ buildscript { repositories { google() - jcenter() + mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:4.2.2' + classpath 'com.android.tools.build:gradle:7.0.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' } } + allprojects { group = "io.github.funkymuse" repositories { google() - jcenter() + mavenCentral() } } @@ -88,6 +88,7 @@ subprojects { apply plugin: 'kotlin-android' apply plugin: 'kotlin-kapt' apply plugin: 'kotlin-parcelize' + dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) } @@ -98,13 +99,14 @@ subprojects { apply plugin: 'java-library' apply plugin: 'kotlin' applyKotlinModule(it) + break default: //setup gradle for libraries apply plugin: 'com.android.library' apply plugin: 'kotlin-android' - apply plugin: 'com.github.dcendents.android-maven' + apply plugin: 'maven-publish' apply plugin: 'kotlin-parcelize' applyAndroid(it, false) @@ -124,6 +126,18 @@ subprojects { androidTestImplementation "androidx.test.espresso:espresso-core:$espressoVersion" } + + it.afterEvaluate { + publishing { + publications { + release(MavenPublication) { + from components.release + } + } + } + } + + break } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 03f9420fa..229484e39 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-6.7.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip diff --git a/jitpack.yml b/jitpack.yml new file mode 100644 index 000000000..8489f0302 --- /dev/null +++ b/jitpack.yml @@ -0,0 +1,5 @@ +jdk: + - openjdk11 +install: + - ./gradlew :app:build :app:publishToMavenLocal + - find . -name "*.aar" diff --git a/kotlinextensions/build.gradle b/kotlinextensions/build.gradle index 6ed942fc2..4d80b80e1 100644 --- a/kotlinextensions/build.gradle +++ b/kotlinextensions/build.gradle @@ -24,7 +24,6 @@ dependencies { implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' implementation "com.google.android.material:material:$material" implementation "androidx.constraintlayout:constraintlayout:$constraint_layout" - implementation "androidx.constraintlayout:constraintlayout-solver:$constraint_layout" //util implementation 'androidx.exifinterface:exifinterface:1.3.2' diff --git a/math/build.gradle b/math/build.gradle index a6e3fc70e..e69de29bb 100644 --- a/math/build.gradle +++ b/math/build.gradle @@ -1,44 +0,0 @@ -plugins { - id 'com.android.library' - id 'kotlin-android' -} - -android { - compileSdkVersion 30 - buildToolsVersion "30.0.3" - - defaultConfig { - minSdkVersion 21 - targetSdkVersion 30 - versionCode 1 - versionName "1.0" - - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - consumerProguardFiles "consumer-rules.pro" - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - kotlinOptions { - jvmTarget = '1.8' - } -} - -dependencies { - - implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" - implementation 'androidx.core:core-ktx:1.7.0-alpha01' - implementation 'androidx.appcompat:appcompat:1.3.1' - implementation 'com.google.android.material:material:1.4.0' - testImplementation 'junit:junit:4.+' - androidTestImplementation 'androidx.test.ext:junit:1.1.3' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' -} \ No newline at end of file diff --git a/viewpager2/build.gradle b/viewpager2/build.gradle index 2052751b2..bcb1bf147 100644 --- a/viewpager2/build.gradle +++ b/viewpager2/build.gradle @@ -5,7 +5,7 @@ dependencies { implementation 'androidx.core:core-ktx:1.7.0-alpha01' implementation 'androidx.appcompat:appcompat:1.3.1' implementation 'com.google.android.material:material:1.4.0' - testImplementation 'junit:junit:4.+' + testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.1.3' androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' } \ No newline at end of file From 7e23d9aebbd8ee50e547defcc716b042e55eba1e Mon Sep 17 00:00:00 2001 From: FunkyMuse Date: Wed, 4 Aug 2021 09:12:06 +0200 Subject: [PATCH 2/2] update jitpack build --- jitpack.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jitpack.yml b/jitpack.yml index 8489f0302..7773c049d 100644 --- a/jitpack.yml +++ b/jitpack.yml @@ -1,5 +1,5 @@ jdk: - openjdk11 install: - - ./gradlew :app:build :app:publishToMavenLocal + - ./gradlew publishToMavenLocal - find . -name "*.aar"