Skip to content

Commit

Permalink
Bug Fixing and Repo Publish Change
Browse files Browse the repository at this point in the history
Bug fixing and added functionality for publishing library to maven repo
  • Loading branch information
jagtapkiran committed Dec 15, 2021
1 parent 0fb0d26 commit f42bb5a
Show file tree
Hide file tree
Showing 10 changed files with 67 additions and 24 deletions.
7 changes: 5 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
lintOptions {
abortOnError false
}
}

dependencies {
Expand All @@ -39,9 +42,9 @@ dependencies {
implementation project(path: ':app:collector')
implementation project(path: ':app:collector-exoplayer')

testImplementation 'junit:junit:4.+'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation "androidx.core:core-ktx:+"
implementation "androidx.core:core-ktx:1.7.0"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
9 changes: 6 additions & 3 deletions app/collector-exoplayer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ plugins {
id 'com.android.library'
}
apply plugin: 'kotlin-android'

apply plugin: 'com.vanniktech.maven.publish'
android {
compileSdk 31

Expand All @@ -26,6 +26,9 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
lintOptions {
abortOnError false
}
}

dependencies {
Expand All @@ -43,9 +46,9 @@ dependencies {
implementation "com.google.android.exoplayer:exoplayer:2.15.1"
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'
implementation "androidx.core:core-ktx:+"
implementation "androidx.core:core-ktx:1.7.0"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
2 changes: 2 additions & 0 deletions app/collector-exoplayer/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
POM_ARTIFACT_ID=collector-exoplayer
POM_NAME=collector-exoplayer
2 changes: 1 addition & 1 deletion app/collector-exoplayer/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="insights.exoplayer">
package="com.gumlet.insights.exoplayer">

</manifest>
11 changes: 7 additions & 4 deletions app/collector/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ plugins {
id 'com.android.library'
}
apply plugin: 'kotlin-android'
apply plugin: 'com.vanniktech.maven.publish'

android {
compileSdk 31
Expand All @@ -26,6 +27,10 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

lintOptions {
abortOnError false
}
}

dependencies {
Expand All @@ -44,14 +49,12 @@ dependencies {
implementation 'com.squareup.retrofit2:adapter-rxjava:2.7.2'
implementation 'com.squareup.okhttp3:logging-interceptor:3.9.1'

implementation 'com.an.deviceinfo:deviceinfo:0.1.5'

implementation 'androidx.multidex:multidex:2.0.1'

implementation "androidx.core:core-ktx:+"
implementation "androidx.core:core-ktx:1.7.0"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

testImplementation 'junit:junit:4+'
testImplementation 'junit:junit:4.13.2'
testImplementation 'com.google.truth:truth:1.0.1'

androidTestImplementation 'androidx.test.ext:junit:1.1.3'
Expand Down
2 changes: 2 additions & 0 deletions app/collector/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
POM_ARTIFACT_ID=collector
POM_NAME=collector
9 changes: 1 addition & 8 deletions app/collector/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="insights">

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
package="com.gumlet.insights">
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
</manifest>
21 changes: 18 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,26 @@ buildscript {
classpath "com.android.tools.build:gradle:7.0.3"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

//Added for releasing library to Maven Repository
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.18.0'
classpath 'org.jetbrains.dokka:dokka-gradle-plugin:1.4.10.2'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}
allprojects {
plugins.withId("com.vanniktech.maven.publish") {
mavenPublish {
releaseSigningEnabled = true
sonatypeHost = "S01"
}
}
repositories {
google()
maven { url "https://jitpack.io" }
}
}

apply plugin: "com.vanniktech.maven.publish"
22 changes: 21 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,24 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
android.enableJetifier=true

# Added POM Details for maven publish
GROUP=com.gumlet.gumlet-insights-sdk-exoplayer
VERSION_NAME=0.0.2

POM_PACKAGING=aar
POM_DESCRIPTION=Gumlet Insights integration with Exoplayer for Android native applications helps to collect video insights. Users can view the data collected on a dashboard.
POM_INCEPTION_YEAR=2021
POM_URL=https://github.com/gumlet/gumlet-insights-sdk-exoplayer
POM_SCM_URL=https://github.com/gumlet/gumlet-insights-sdk-exoplayer
POM_SCM_CONNECTION=scm:git@github.com:gumlet/gumlet-insights-sdk-exoplayer.git
POM_SCM_DEV_CONNECTION=scm:git@github.com:gumlet/gumlet-insights-sdk-exoplayer.git

POM_LICENCE_NAME=MIT License
POM_LICENCE_URL=https://www.opensource.org/licenses/mit-license.php
POM_LICENCE_DIST=repo

POM_DEVELOPER_ID=gumlet
POM_DEVELOPER_NAME=Gumlet
POM_DEVELOPER_URL=https://github.com/gumlet
6 changes: 4 additions & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import org.gradle.api.initialization.resolve.RepositoriesMode

dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
repositories {
google()
mavenCentral()
jcenter() // Warning: this repository is going to shut down soon
maven { url "https://jitpack.io" }
}
}
rootProject.name = "gumlet-insights-sdk-exoplayer"
Expand Down

0 comments on commit f42bb5a

Please sign in to comment.