Skip to content

Commit

Permalink
chore: move to maven central
Browse files Browse the repository at this point in the history
  • Loading branch information
Punyapat Sessomboon committed May 27, 2023
1 parent 157d172 commit 13444e5
Show file tree
Hide file tree
Showing 17 changed files with 54 additions and 13 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@ Android View for displaying MJPEG stream.
- A boundary must be specified in an HTTP headr (Content-type). Otherwise a default boundary pattern will be used.

Basic usage<br/>
1. This library is hosted on JitPack, so add it in your <b>root</b> build.gradle at the end of repositories.
1. This library is hosted on Maven Central, so make sure you added `mavenCentral()` as one of repositories
```gradle
allprojects {
dependencyResolutionManagement {
...
repositories {
...
maven { url 'https://jitpack.io' }
mavenCentral()
}
}
```

2. Include a library in to your project by adding this to <b>app level</b> build.gradle file.
```gradle
dependencies {
// other dependencies
implementation 'com.github.perthcpe23:android-mjpeg-view:v1.0.9'
...
implementation 'com.perthcpe23.dev:android-mjpeg-view:1.1.1'
}
```

Expand Down Expand Up @@ -52,7 +52,7 @@ viewer.stopStream();
<uses-permission android:name="android.permission.INTERNET" />
````

* You can also download .aar at https://github.com/perthcpe23/android-mjpeg-view/tree/master/arr
* You can also download .aar at https://github.com/perthcpe23/android-mjpeg-view/tree/master/aar

# Contact
perth.s28@gmail.com
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion arr/release_note → aar/release_note
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@ mjpegviewer_v1.0.9.aar
- support pinch-zoom and pan
- move to JitPack

mjpegviewer_v1.0.9.aar
mjpegviewer_v1.1.1.aar
- update gradle version from 6.5 to 8.0
- move to maven central as it's more stable
50 changes: 45 additions & 5 deletions mjpegviewer/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
apply plugin: 'com.android.library'
apply plugin: 'maven-publish'
apply plugin: 'signing'

android {
namespace 'com.longdo.mjpegviewer'
compileSdkVersion 33
buildToolsVersion '30.0.3'

compileOptions {
sourceCompatibility JavaVersion.VERSION_18
targetCompatibility JavaVersion.VERSION_18
}
defaultConfig {
aarMetadata {
minCompileSdk = 14
Expand All @@ -24,6 +21,7 @@ android {
publishing {
singleVariant('release') {
withSourcesJar()
withJavadocJar()
}
}
}
Expand All @@ -33,14 +31,56 @@ afterEvaluate {
publications {
release(MavenPublication) {
from components.release
groupId 'com.github.perthcpe23'
groupId 'com.perthcpe23.dev'
artifactId 'android-mjpeg-view'
version '1.1.1'

pom {
name = "Android Mjpeg View"
description = "Android custom View to render Mjpeg stream"
url = "https://github.com/perthcpe23/android-mjpeg-view"
licenses {
license {
name = "The MIT License (MIT)"
url = "https://opensource.org/license/mit/"
}
}
developers {
developer {
id = "perthcpe23"
name = "Punyapat S"
email = "perth.s28@gmail.com"
}
}
scm {
connection = "scm:git:git://github.com/perthcpe23/android-mjpeg-view.git"
developerConnection = "scm:git:ssh://github.com:perthcpe23/android-mjpeg-view.git"
url = "http://github.com/perthcpe23/android-mjpeg-view/tree/master"
}
}
}
}
repositories {
maven {
name = "Central" // optional target repository name
url = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
}
maven {
name = "Local" // optional target repository name
url = layout.buildDirectory.dir('local_repo')
}
}
}
}

signing {
sign publishing.publications
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.6.1'
Expand Down

0 comments on commit 13444e5

Please sign in to comment.