From ebd103b3f6f4005982238b2f203a41d9b9695e80 Mon Sep 17 00:00:00 2001 From: chyngyz Date: Fri, 10 Nov 2023 20:38:51 +0600 Subject: [PATCH] Add maven-publish plugin --- app/build.gradle | 11 +++++++---- bitcoincashkit/build.gradle | 29 +++++++++++++++++++---------- bitcoincore/build.gradle | 29 +++++++++++++++++++---------- bitcoinkit/build.gradle | 29 +++++++++++++++++++---------- build.gradle | 4 ++-- dashkit/build.gradle | 29 +++++++++++++++++++---------- ecashkit/build.gradle | 29 +++++++++++++++++++---------- hodler/build.gradle | 24 +++++++++++++++++++----- litecoinkit/build.gradle | 29 +++++++++++++++++++---------- 9 files changed, 142 insertions(+), 71 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 0bb2da70..3978f678 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,8 +1,12 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' +plugins { + id 'com.android.application' + id 'org.jetbrains.kotlin.android' +} android { + namespace 'io.horizontalsystems.bitcoinkit.demo' compileSdk 34 + defaultConfig { applicationId "io.horizontalsystems.bitcoinkit.demo" minSdkVersion 23 @@ -17,17 +21,16 @@ android { proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } - kotlinOptions { jvmTarget = '17' } compileOptions { sourceCompatibility JavaVersion.VERSION_17 targetCompatibility JavaVersion.VERSION_17 } + kotlinOptions { jvmTarget = '17' } packagingOptions { resources { pickFirsts += ['META-INF/atomicfu.kotlin_module'] } } - namespace 'io.horizontalsystems.bitcoinkit.demo' } dependencies { diff --git a/bitcoincashkit/build.gradle b/bitcoincashkit/build.gradle index 0a8c6115..a0845bec 100644 --- a/bitcoincashkit/build.gradle +++ b/bitcoincashkit/build.gradle @@ -1,9 +1,23 @@ -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' -apply plugin: 'kotlin-kapt' +plugins { + id 'com.android.library' + id 'kotlin-android' + id 'kotlin-kapt' + id 'maven-publish' +} + +afterEvaluate { + publishing { + publications { + release(MavenPublication) { + from components.release + } + } + } +} android { - compileSdkVersion 34 + namespace 'io.horizontalsystems.bitcoincashkit' + compileSdk 34 defaultConfig { minSdkVersion 23 @@ -24,12 +38,11 @@ android { test.java.srcDirs += 'src/test/kotlin' } - kotlinOptions { jvmTarget = '17' } compileOptions { sourceCompatibility JavaVersion.VERSION_17 targetCompatibility JavaVersion.VERSION_17 } - namespace 'io.horizontalsystems.bitcoincashkit' + kotlinOptions { jvmTarget = '17' } } dependencies { @@ -62,7 +75,3 @@ dependencies { androidTestImplementation 'com.linkedin.dexmaker:dexmaker-mockito-inline:2.19.1' androidTestImplementation 'com.nhaarman:mockito-kotlin-kt1.1:1.6.0' } - -repositories { - mavenCentral() -} diff --git a/bitcoincore/build.gradle b/bitcoincore/build.gradle index 4515a7dd..0af3d0ef 100644 --- a/bitcoincore/build.gradle +++ b/bitcoincore/build.gradle @@ -1,9 +1,23 @@ -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' -apply plugin: 'kotlin-kapt' +plugins { + id 'com.android.library' + id 'kotlin-android' + id 'kotlin-kapt' + id 'maven-publish' +} + +afterEvaluate { + publishing { + publications { + release(MavenPublication) { + from components.release + } + } + } +} android { - compileSdkVersion 34 + namespace 'io.horizontalsystems.bitcoincore' + compileSdk 34 defaultConfig { minSdkVersion 23 @@ -31,12 +45,11 @@ android { test.java.srcDirs += 'src/test/kotlin' } - kotlinOptions { jvmTarget = '17' } compileOptions { sourceCompatibility JavaVersion.VERSION_17 targetCompatibility JavaVersion.VERSION_17 } - namespace 'io.horizontalsystems.bitcoincore' + kotlinOptions { jvmTarget = '17' } } dependencies { @@ -81,7 +94,3 @@ dependencies { testImplementation "com.linkedin.dexmaker:dexmaker-mockito-inline:2.19.1" testImplementation 'androidx.test.ext:junit:1.1.1' } - -repositories { - mavenCentral() -} diff --git a/bitcoinkit/build.gradle b/bitcoinkit/build.gradle index e3b392d1..e554e555 100644 --- a/bitcoinkit/build.gradle +++ b/bitcoinkit/build.gradle @@ -1,9 +1,23 @@ -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' -apply plugin: 'kotlin-kapt' +plugins { + id 'com.android.library' + id 'kotlin-android' + id 'kotlin-kapt' + id 'maven-publish' +} + +afterEvaluate { + publishing { + publications { + release(MavenPublication) { + from components.release + } + } + } +} android { - compileSdkVersion 34 + namespace 'io.horizontalsystems.bitcoinkit' + compileSdk 34 defaultConfig { minSdkVersion 23 @@ -24,12 +38,11 @@ android { test.java.srcDirs += 'src/test/kotlin' } - kotlinOptions { jvmTarget = '17' } compileOptions { sourceCompatibility JavaVersion.VERSION_17 targetCompatibility JavaVersion.VERSION_17 } - namespace 'io.horizontalsystems.bitcoinkit' + kotlinOptions { jvmTarget = '17' } } dependencies { @@ -63,7 +76,3 @@ dependencies { androidTestImplementation 'com.linkedin.dexmaker:dexmaker-mockito-inline:2.19.1' androidTestImplementation 'com.nhaarman:mockito-kotlin-kt1.1:1.6.0' } - -repositories { - mavenCentral() -} diff --git a/build.gradle b/build.gradle index 3996c29b..ba065ac6 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ buildscript { ext.kotlin_version = '1.8.0' repositories { google() - jcenter() + mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:8.1.1' @@ -18,7 +18,7 @@ buildscript { allprojects { repositories { google() - jcenter() + mavenCentral() maven { url "https://jitpack.io" } } } diff --git a/dashkit/build.gradle b/dashkit/build.gradle index 041eb07d..0f6232c6 100644 --- a/dashkit/build.gradle +++ b/dashkit/build.gradle @@ -1,9 +1,23 @@ -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' -apply plugin: 'kotlin-kapt' +plugins { + id 'com.android.library' + id 'kotlin-android' + id 'kotlin-kapt' + id 'maven-publish' +} + +afterEvaluate { + publishing { + publications { + release(MavenPublication) { + from components.release + } + } + } +} android { - compileSdkVersion 34 + namespace 'io.horizontalsystems.dashkit' + compileSdk 34 defaultConfig { minSdkVersion 23 @@ -31,18 +45,17 @@ android { test.java.srcDirs += 'src/test/kotlin' } - kotlinOptions { jvmTarget = '17' } compileOptions { sourceCompatibility JavaVersion.VERSION_17 targetCompatibility JavaVersion.VERSION_17 } + kotlinOptions { jvmTarget = '17' } externalNativeBuild { cmake { path 'cpp/CMakeLists.txt' } } - namespace 'io.horizontalsystems.dashkit' } dependencies { @@ -80,7 +93,3 @@ dependencies { androidTestImplementation 'com.linkedin.dexmaker:dexmaker-mockito-inline:2.19.1' androidTestImplementation 'com.nhaarman:mockito-kotlin-kt1.1:1.6.0' } - -repositories { - mavenCentral() -} diff --git a/ecashkit/build.gradle b/ecashkit/build.gradle index 7fa8d015..e3b946a2 100644 --- a/ecashkit/build.gradle +++ b/ecashkit/build.gradle @@ -1,9 +1,23 @@ -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' -apply plugin: 'kotlin-kapt' +plugins { + id 'com.android.library' + id 'kotlin-android' + id 'kotlin-kapt' + id 'maven-publish' +} + +afterEvaluate { + publishing { + publications { + release(MavenPublication) { + from components.release + } + } + } +} android { - compileSdkVersion 34 + namespace 'io.horizontalsystems.ecashkit' + compileSdk 34 defaultConfig { minSdkVersion 23 @@ -24,12 +38,11 @@ android { test.java.srcDirs += 'src/test/kotlin' } - kotlinOptions { jvmTarget = '17' } compileOptions { sourceCompatibility JavaVersion.VERSION_17 targetCompatibility JavaVersion.VERSION_17 } - namespace 'io.horizontalsystems.ecashkit' + kotlinOptions { jvmTarget = '17' } } dependencies { @@ -65,7 +78,3 @@ dependencies { androidTestImplementation 'com.linkedin.dexmaker:dexmaker-mockito-inline:2.19.1' androidTestImplementation 'com.nhaarman:mockito-kotlin-kt1.1:1.6.0' } - -repositories { - mavenCentral() -} diff --git a/hodler/build.gradle b/hodler/build.gradle index 23bc8aa1..c3702234 100644 --- a/hodler/build.gradle +++ b/hodler/build.gradle @@ -1,8 +1,23 @@ -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' +plugins { + id 'com.android.library' + id 'kotlin-android' + id 'kotlin-kapt' + id 'maven-publish' +} + +afterEvaluate { + publishing { + publications { + release(MavenPublication) { + from components.release + } + } + } +} android { - compileSdkVersion 34 + namespace 'io.horizontalsystems.hodler' + compileSdk 34 defaultConfig { minSdkVersion 23 @@ -24,12 +39,11 @@ android { test.java.srcDirs += 'src/test/kotlin' } - kotlinOptions { jvmTarget = '17' } compileOptions { sourceCompatibility JavaVersion.VERSION_17 targetCompatibility JavaVersion.VERSION_17 } - namespace 'io.horizontalsystems.hodler' + kotlinOptions { jvmTarget = '17' } } dependencies { diff --git a/litecoinkit/build.gradle b/litecoinkit/build.gradle index 98211f20..4c39890c 100644 --- a/litecoinkit/build.gradle +++ b/litecoinkit/build.gradle @@ -1,9 +1,23 @@ -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' -apply plugin: 'kotlin-kapt' +plugins { + id 'com.android.library' + id 'kotlin-android' + id 'kotlin-kapt' + id 'maven-publish' +} + +afterEvaluate { + publishing { + publications { + release(MavenPublication) { + from components.release + } + } + } +} android { - compileSdkVersion 34 + namespace 'io.horizontalsystems.litecoinkit' + compileSdk 34 defaultConfig { minSdkVersion 23 @@ -25,12 +39,11 @@ android { test.java.srcDirs += 'src/test/kotlin' } - kotlinOptions { jvmTarget = '17' } compileOptions { sourceCompatibility JavaVersion.VERSION_17 targetCompatibility JavaVersion.VERSION_17 } - namespace 'io.horizontalsystems.litecoinkit' + kotlinOptions { jvmTarget = '17' } } @@ -51,7 +64,3 @@ dependencies { androidTestImplementation 'androidx.test.ext:junit:1.1.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' } - -repositories { - mavenCentral() -}