Skip to content

Commit 0c42cb7

Browse files
committed
release 1.0.0
1 parent 2af762e commit 0c42cb7

File tree

3 files changed

+142
-7
lines changed

3 files changed

+142
-7
lines changed

android-obd-library/build.gradle

+136-4
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,17 @@ apply plugin: 'kotlin-kapt'
55
apply plugin: 'kotlinx-serialization'
66
apply plugin: 'maven'
77
apply plugin: 'com.github.dcendents.android-maven'
8+
apply plugin: 'org.jetbrains.dokka'
9+
apply plugin: 'com.jfrog.bintray'
810

9-
version = "1.0.0-SNAPSHOT"
10-
group = "com.pnuema.android.obd"
11+
version = "1.0.0"
12+
group = "com.pnuema.android"
13+
14+
ext {
15+
siteUrl = 'https://github.com/barnhill/AndroidOBD'
16+
gitUrl = 'https://github.com/barnhill/AndroidOBD.git'
17+
descr = 'Android library to communicate with ELM327 based OBD devices'
18+
}
1119

1220
android {
1321
compileSdkVersion 30
@@ -16,7 +24,7 @@ android {
1624
minSdkVersion 17
1725
targetSdkVersion 30
1826
versionCode 1
19-
versionName "1.0"
27+
versionName version
2028
}
2129

2230
buildTypes {
@@ -43,11 +51,24 @@ dependencies {
4351
implementation "androidx.startup:startup-runtime:1.0.0"
4452
}
4553

54+
dokkaHtml.configure {
55+
dokkaSourceSets {
56+
named("main") {
57+
noAndroidSdkLink.set(false)
58+
}
59+
}
60+
}
61+
4662
task sourcesJar(type: Jar) {
4763
classifier = 'sources'
4864
from android.sourceSets.main.java.srcDirs
4965
}
5066

67+
task javadocJar(type: Jar, dependsOn: dokkaJavadoc) {
68+
classifier = 'javadoc'
69+
from dokkaJavadoc.outputDirectory
70+
}
71+
5172
task javadoc(type: Javadoc) {
5273
source = android.sourceSets.main.java.srcDirs
5374
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
@@ -56,5 +77,116 @@ task javadoc(type: Javadoc) {
5677
}
5778

5879
artifacts {
80+
archives javadocJar
5981
archives sourcesJar
60-
}
82+
}
83+
84+
install {
85+
repositories.mavenInstaller {
86+
// This generates POM.xml with proper parameters
87+
pom {
88+
project {
89+
packaging 'aar'
90+
91+
// Add your description here
92+
name 'com.pnuema.android:obd'
93+
description = descr
94+
url siteUrl
95+
96+
// Set your license
97+
licenses {
98+
license {
99+
name 'The Apache Software License, Version 2.0'
100+
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
101+
}
102+
}
103+
developers {
104+
developer {
105+
id 'bbarnhill'
106+
name 'Brad Barnhill'
107+
108+
}
109+
}
110+
scm {
111+
connection gitUrl
112+
developerConnection gitUrl
113+
url siteUrl
114+
}
115+
}
116+
}
117+
}
118+
}
119+
120+
bintray {
121+
if (System.getenv("BINTRAY_USER") != null)
122+
user = System.getenv("BINTRAY_USER")
123+
else
124+
user = BINTRAY_USER
125+
126+
if (System.getenv("BINTRAY_APIKEY") != null)
127+
key = System.getenv("BINTRAY_APIKEY")
128+
else
129+
key = BINTRAY_APIKEY
130+
131+
dryRun = false //[Default: false] Whether to run this as dry-run, without deploying
132+
publish = true //[Default: false] Whether version should be auto published after an upload
133+
override = false //[Default: false] Whether to override version artifacts already published
134+
pkg {
135+
configurations = ['archives']
136+
repo = "maven"
137+
name = "obd"
138+
desc = descr
139+
websiteUrl = "https://github.com/barnhill/AndroidOBD"
140+
githubRepo = 'barnhill/AndroidOBD'
141+
githubReleaseNotesFile = 'README.md'
142+
issueTrackerUrl = 'https://github.com/barnhill/AndroidOBD/issues'
143+
vcsUrl = "https://github.com/barnhill/AndroidOBD.git"
144+
licenses = ["Apache-2.0"]
145+
labels = ['android', 'obd', 'obdII', 'diagnostics', 'onboard', 'aar', 'android']
146+
publicDownloadNumbers = true
147+
publish = true
148+
version {
149+
gpg {
150+
sign = true
151+
if (System.getenv("BINTRAY_GPGPASSWORD") != null)
152+
passphrase = System.getenv("BINTRAY_GPGPASSWORD")
153+
else
154+
passphrase = BINTRAY_GPGPASSWORD
155+
}
156+
}
157+
}
158+
}
159+
160+
task createPom {
161+
pom {
162+
project {
163+
packaging 'aar'
164+
165+
name project.name
166+
description descr
167+
url siteUrl
168+
inceptionYear '2018'
169+
170+
licenses {
171+
license {
172+
name 'The Apache Software License, Version 2.0'
173+
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
174+
}
175+
}
176+
scm {
177+
connection gitUrl
178+
developerConnection gitUrl
179+
url siteUrl
180+
}
181+
developers {
182+
developer {
183+
id 'barnhill'
184+
name 'Brad Barnhill'
185+
186+
}
187+
}
188+
}
189+
}.writeTo("$buildDir/poms/pom-default.xml").writeTo("pom.xml")
190+
}
191+
build.dependsOn createPom
192+
build.dependsOn dokkaJavadoc

build.gradle

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22
wrapper {
3-
gradleVersion = '6.7'
3+
gradleVersion = '6.7.1'
44
}
55

66
buildscript {
@@ -11,10 +11,13 @@ buildscript {
1111
mavenLocal()
1212
}
1313
dependencies {
14-
classpath 'com.android.tools.build:gradle:4.1.0'
14+
classpath 'com.android.tools.build:gradle:4.1.1'
1515
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
1616
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1717
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
18+
classpath "org.jetbrains.dokka:dokka-gradle-plugin:1.4.0"
19+
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
20+
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
1821
}
1922
}
2023

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)