Skip to content

Commit

Permalink
Merge pull request #20 from newrelic/hotfix/jitpack_issue
Browse files Browse the repository at this point in the history
Fix JitPack issue
  • Loading branch information
asllop authored Oct 24, 2023
2 parents e2fbb9f + dfa2bc2 commit 5b73a5f
Show file tree
Hide file tree
Showing 11 changed files with 71 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 16 additions & 2 deletions NRExoPlayerTracker/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
id 'com.android.library'
id 'maven-publish'
}

android {
Expand All @@ -8,8 +9,8 @@ android {
defaultConfig {
minSdkVersion 16
targetSdkVersion 33
versionCode 2
versionName "1.0.2"
versionCode 3
versionName "1.0.3"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
Expand Down Expand Up @@ -46,3 +47,16 @@ dependencies {
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}

afterEvaluate {
publishing {
publications {
release(MavenPublication) {
from components.release
groupId = 'com.github.newrelic'
artifactId = 'NRExoPlayerTracker'
version = "${android.defaultConfig.versionName}"
}
}
}
}
18 changes: 16 additions & 2 deletions NRIMATracker/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
id 'com.android.library'
id 'maven-publish'
}

android {
Expand All @@ -8,8 +9,8 @@ android {
defaultConfig {
minSdkVersion 16
targetSdkVersion 33
versionCode 2
versionName "1.0.2"
versionCode 3
versionName "1.0.3"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
Expand Down Expand Up @@ -46,3 +47,16 @@ dependencies {
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}

afterEvaluate {
publishing {
publications {
release(MavenPublication) {
from components.release
groupId = 'com.github.newrelic'
artifactId = 'NRIMATracker'
version = "${android.defaultConfig.versionName}"
}
}
}
}
18 changes: 16 additions & 2 deletions NewRelicVideoCore/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
id 'com.android.library'
id 'maven-publish'
}

android {
Expand All @@ -8,8 +9,8 @@ android {
defaultConfig {
minSdkVersion 16
targetSdkVersion 33
versionCode 5
versionName "1.0.2"
versionCode 6
versionName "1.0.3"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
Expand Down Expand Up @@ -45,3 +46,16 @@ dependencies {
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}

afterEvaluate {
publishing {
publications {
release(MavenPublication) {
from components.release
groupId = 'com.github.newrelic'
artifactId = 'NewRelicVideoCore'
version = "${android.defaultConfig.versionName}"
}
}
}
}
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ android {
applicationId "com.newrelic.nrvideoproject"
minSdkVersion 16
targetSdkVersion 33
versionCode 1
versionName "1.0"
versionCode 2
versionName "1.1"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

Expand Down
5 changes: 3 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
<activity
android:name=".VideoPlayerAds"
android:label="@string/title_activity_video_player_ads"
android:theme="@style/Theme.NRVideoProject.NoActionBar"></activity>
<activity android:name=".VideoPlayer" />
android:theme="@style/Theme.NRVideoProject.NoActionBar"
android:exported="false"></activity>
<activity android:name=".VideoPlayer" android:exported="false" />
<activity android:name=".MainActivity" android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import androidx.appcompat.app.AppCompatActivity;
import androidx.media3.common.MediaItem;
import androidx.media3.exoplayer.SimpleExoPlayer;
import androidx.media3.exoplayer.ExoPlayer;
import androidx.media3.ui.PlayerView;

import android.os.Bundle;
Expand All @@ -16,7 +16,7 @@

public class VideoPlayer extends AppCompatActivity {

private SimpleExoPlayer player;
private ExoPlayer player;
private Integer trackerId;

@Override
Expand Down Expand Up @@ -55,7 +55,7 @@ protected void onDestroy() {
}

private void playVideo(String videoUrl) {
player = new SimpleExoPlayer.Builder(this).build();
player = new ExoPlayer.Builder(this).build();

NRTrackerExoPlayer tracker = new NRTrackerExoPlayer();

Expand Down
7 changes: 5 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
maven { url "https://jitpack.io" }
}
dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'
Expand All @@ -14,10 +14,13 @@ buildscript {
}
}

// Necessary??
apply plugin: 'maven-publish'

allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

Expand Down
2 changes: 2 additions & 0 deletions jitpack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
jdk:
- openjdk11

0 comments on commit 5b73a5f

Please sign in to comment.