From 3f47bd195176530015d560fb5c9cbfd7a2f8a810 Mon Sep 17 00:00:00 2001 From: Hannes Achleitner Date: Thu, 27 Aug 2020 21:37:07 +0200 Subject: [PATCH 1/3] Release on https://jitpack.io/#ytai/ioio --- IOIOLibAndroid/build.gradle | 13 ++----------- IOIOLibAndroidAccessory/build.gradle | 15 +++------------ IOIOLibAndroidBluetooth/build.gradle | 15 +++------------ IOIOLibAndroidDevice/build.gradle | 15 +++------------ IOIOLibCore/build.gradle | 11 ----------- IOIOLibPC/build.gradle | 11 ----------- build.gradle | 9 +++++---- 7 files changed, 16 insertions(+), 73 deletions(-) diff --git a/IOIOLibAndroid/build.gradle b/IOIOLibAndroid/build.gradle index afd02f18f..8605381c8 100644 --- a/IOIOLibAndroid/build.gradle +++ b/IOIOLibAndroid/build.gradle @@ -1,16 +1,7 @@ apply plugin: 'com.android.library' +apply plugin: 'com.github.dcendents.android-maven' -uploadArchives { - repositories { - mavenDeployer { - pom.project { - name = 'IOIOLibAndroid' - description = 'IOIO library for Android - common code with ADB support' - packaging = 'aar' - } - } - } -} +group = 'ioio.lib' android { compileSdkVersion 30 diff --git a/IOIOLibAndroidAccessory/build.gradle b/IOIOLibAndroidAccessory/build.gradle index e6b2658b7..dad76d263 100644 --- a/IOIOLibAndroidAccessory/build.gradle +++ b/IOIOLibAndroidAccessory/build.gradle @@ -1,4 +1,7 @@ apply plugin: 'com.android.library' +apply plugin: 'com.github.dcendents.android-maven' + +group = 'ioio.lib.accessory' android { compileSdkVersion 30 @@ -11,18 +14,6 @@ android { } } -uploadArchives { - repositories { - mavenDeployer { - pom.project { - name = 'IOIOLibAndroidAccessory' - description = 'IOIO library for Android - OpenAccessory extenstion' - packaging = 'aar' - } - } - } -} - dependencies { api project(":IOIOLibAndroid") } diff --git a/IOIOLibAndroidBluetooth/build.gradle b/IOIOLibAndroidBluetooth/build.gradle index fce26e109..8908b4046 100644 --- a/IOIOLibAndroidBluetooth/build.gradle +++ b/IOIOLibAndroidBluetooth/build.gradle @@ -1,4 +1,7 @@ apply plugin: 'com.android.library' +apply plugin: 'com.github.dcendents.android-maven' + +group = 'ioio.lib.bluetooth' android { compileSdkVersion 30 @@ -11,18 +14,6 @@ android { } } -uploadArchives { - repositories { - mavenDeployer { - pom.project { - name = 'IOIOLibAndroidBluetooth' - description = 'IOIO library for Android - Bluetooth extenstion' - packaging = 'aar' - } - } - } -} - dependencies { api project(":IOIOLibAndroid") } diff --git a/IOIOLibAndroidDevice/build.gradle b/IOIOLibAndroidDevice/build.gradle index dc8243172..7bf505c57 100644 --- a/IOIOLibAndroidDevice/build.gradle +++ b/IOIOLibAndroidDevice/build.gradle @@ -1,4 +1,7 @@ apply plugin: 'com.android.library' +apply plugin: 'com.github.dcendents.android-maven' + +group = 'ioio.lib.device' android { compileSdkVersion 30 @@ -11,18 +14,6 @@ android { } } -uploadArchives { - repositories { - mavenDeployer { - pom.project { - name = 'IOIOLibAndroidDevice' - description = 'IOIO library for Android - USB device extenstion' - packaging = 'aar' - } - } - } -} - dependencies { api project(":IOIOLibAndroid") } diff --git a/IOIOLibCore/build.gradle b/IOIOLibCore/build.gradle index f80b38310..96c262f00 100644 --- a/IOIOLibCore/build.gradle +++ b/IOIOLibCore/build.gradle @@ -1,16 +1,5 @@ apply plugin: 'java' -uploadArchives { - repositories { - mavenDeployer { - pom.project { - name = 'IOIOLibCore' - description = 'Common core of the IOIO library' - } - } - } -} - task generateVersionFile(type: GenerateVersion) { version = versionString outputFile = file("$project.buildDir/classes/main/version.properties") diff --git a/IOIOLibPC/build.gradle b/IOIOLibPC/build.gradle index 26dff43b1..b95a83ed3 100644 --- a/IOIOLibPC/build.gradle +++ b/IOIOLibPC/build.gradle @@ -1,16 +1,5 @@ apply plugin: 'java-library' -uploadArchives { - repositories { - mavenDeployer { - pom.project { - name = 'IOIOLibPC' - description = 'IOIO Library for PC applications' - } - } - } -} - javadoc { source = fileTree(dir: 'src/main/java') failOnError = false diff --git a/build.gradle b/build.gradle index fbe11a938..1c615d8e1 100644 --- a/build.gradle +++ b/build.gradle @@ -7,6 +7,7 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:4.0.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' } } @@ -18,9 +19,6 @@ allprojects { } subprojects { - apply plugin: 'maven' - apply plugin: 'signing' - repositories { google() jcenter() @@ -48,7 +46,10 @@ static def getTag() { tagVersion = process.text.toString().trim() + dirty } else { def tagVersionToken = tagVersion.split("/") - tagVersion = tagVersionToken[2] + if (tagVersionToken.size() > 2) + tagVersion = tagVersionToken[2] + else + tagVersion = tagVersionToken[0] } return tagVersion } From 9e073846d94892f19ddf07acc8ea7bcedd9f0049 Mon Sep 17 00:00:00 2001 From: Hannes Achleitner Date: Sat, 12 Sep 2020 08:43:36 +0200 Subject: [PATCH 2/3] Harmonize maven group --- IOIOLibAndroid/build.gradle | 2 -- IOIOLibAndroidAccessory/build.gradle | 2 -- IOIOLibAndroidBluetooth/build.gradle | 2 -- IOIOLibAndroidDevice/build.gradle | 2 -- build.gradle | 2 +- 5 files changed, 1 insertion(+), 9 deletions(-) diff --git a/IOIOLibAndroid/build.gradle b/IOIOLibAndroid/build.gradle index 8605381c8..98edfd518 100644 --- a/IOIOLibAndroid/build.gradle +++ b/IOIOLibAndroid/build.gradle @@ -1,8 +1,6 @@ apply plugin: 'com.android.library' apply plugin: 'com.github.dcendents.android-maven' -group = 'ioio.lib' - android { compileSdkVersion 30 defaultConfig { diff --git a/IOIOLibAndroidAccessory/build.gradle b/IOIOLibAndroidAccessory/build.gradle index dad76d263..0ada42beb 100644 --- a/IOIOLibAndroidAccessory/build.gradle +++ b/IOIOLibAndroidAccessory/build.gradle @@ -1,8 +1,6 @@ apply plugin: 'com.android.library' apply plugin: 'com.github.dcendents.android-maven' -group = 'ioio.lib.accessory' - android { compileSdkVersion 30 defaultConfig { diff --git a/IOIOLibAndroidBluetooth/build.gradle b/IOIOLibAndroidBluetooth/build.gradle index 8908b4046..0ada42beb 100644 --- a/IOIOLibAndroidBluetooth/build.gradle +++ b/IOIOLibAndroidBluetooth/build.gradle @@ -1,8 +1,6 @@ apply plugin: 'com.android.library' apply plugin: 'com.github.dcendents.android-maven' -group = 'ioio.lib.bluetooth' - android { compileSdkVersion 30 defaultConfig { diff --git a/IOIOLibAndroidDevice/build.gradle b/IOIOLibAndroidDevice/build.gradle index 7bf505c57..0ada42beb 100644 --- a/IOIOLibAndroidDevice/build.gradle +++ b/IOIOLibAndroidDevice/build.gradle @@ -1,8 +1,6 @@ apply plugin: 'com.android.library' apply plugin: 'com.github.dcendents.android-maven' -group = 'ioio.lib.device' - android { compileSdkVersion 30 defaultConfig { diff --git a/build.gradle b/build.gradle index 1c615d8e1..799961fa0 100644 --- a/build.gradle +++ b/build.gradle @@ -12,7 +12,7 @@ buildscript { } allprojects { - group = 'com.github.ytai.ioio' + group = 'com.github.ioio' version = getTag() ext.versionNamespace = 'IOIO' ext.versionString = sprintf("%s%s", versionNamespace, version) From 9ac80ef17577c8f0c24eaec75d670999f13dba8f Mon Sep 17 00:00:00 2001 From: Hannes Achleitner Date: Sun, 13 Sep 2020 10:21:26 +0200 Subject: [PATCH 3/3] Readme --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index 900e980d0..ecc299572 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +[![](https://jitpack.io/v/ytai/ioio.svg)](https://jitpack.io/#ytai/ioio) IOIO Logo The IOIO is a board that provides a host machine the capability of interfacing with external hardware over a variety of commonly used protocols. The original IOIO board has been specifically designed to work with Android devices. The newer IOIO-OTG ("on the go") boards work with both Android devices and PC's (details [here](http://ytai-mer.blogspot.com/2012/05/second-generation-of-ioio-is-in-works.html)). @@ -19,3 +20,24 @@ You can purchase a IOIO-OTG board online from: - [CuteDigi](http://www.cutedigi.com/development-tools/pic/ioio-otg-for-android.html). - [AliExpress](http://www.aliexpress.com/store/product/Free-Shipping-IOIO-OTG/600038_781363573.html). +## Usage in Gradle + +in top `build.gradle` + + allprojects { + repositories { + ... + maven { url 'https://jitpack.io' } + } + } + +and in module `build.gradle` + + dependencies { + implementation "com.github.ytai.ioio:IOIOLibAndroidBluetooth:$LATEST" + implementation "com.github.ytai.ioio:IOIOLibAndroidAccessory:$LATEST" + implementation "com.github.ytai.ioio:IOIOLibAndroidDevice:$LATEST" + } + +Please see details here https://jitpack.io/#ytai/ioio +