Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove jcenter, update librarlies #1

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,18 @@ android {
compileOptions {
targetCompatibility = JavaVersion.VERSION_1_8
}

packagingOptions {
exclude("META-INF/DEPENDENCIES")
exclude("META-INF/INDEX.LIST")
exclude("META-INF/library_release.kotlin_module")
}
}

dependencies {
implementation("androidx.appcompat:appcompat:1.1.0")
implementation("com.google.android.exoplayer:exoplayer-core:2.9.3")
implementation("com.google.android.exoplayer:exoplayer-ui:2.9.3")
implementation("com.otaliastudios.opengl:egloo:0.4.0")
implementation("com.google.android.exoplayer:exoplayer-core:2.15.1")
implementation("com.google.android.exoplayer:exoplayer-ui:2.15.1")
implementation("com.otaliastudios.opengl:egloo:0.6.1")
implementation(project(":library"))
}
23 changes: 15 additions & 8 deletions app/src/main/java/com/otaliastudios/zoom/demo/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,29 @@
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.content.ContextCompat;

import com.google.android.exoplayer2.ExoPlayerFactory;
import com.google.android.exoplayer2.DefaultRenderersFactory;
import com.google.android.exoplayer2.MediaItem;
import com.google.android.exoplayer2.Player;
import com.google.android.exoplayer2.SimpleExoPlayer;
import com.google.android.exoplayer2.source.ExtractorMediaSource;
import com.google.android.exoplayer2.metadata.Metadata;
import com.google.android.exoplayer2.source.MediaSource;
import com.google.android.exoplayer2.source.ProgressiveMediaSource;
import com.google.android.exoplayer2.text.Cue;
import com.google.android.exoplayer2.ui.PlayerControlView;
import com.google.android.exoplayer2.upstream.DataSource;
import com.google.android.exoplayer2.upstream.DefaultDataSourceFactory;
import com.google.android.exoplayer2.util.Util;
import com.google.android.exoplayer2.video.VideoListener;
import com.google.android.exoplayer2.video.VideoSize;
import com.otaliastudios.zoom.ZoomImageView;
import com.otaliastudios.zoom.ZoomLayout;
import com.otaliastudios.zoom.ZoomLogger;
import com.otaliastudios.zoom.ZoomSurfaceView;

import org.jetbrains.annotations.NotNull;

import java.util.List;


public class MainActivity extends AppCompatActivity {

Expand Down Expand Up @@ -111,13 +118,13 @@ protected void onStart() {

@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)
private void setUpVideoPlayer() {
player = ExoPlayerFactory.newSimpleInstance(this);
player = new SimpleExoPlayer.Builder(this, new DefaultRenderersFactory(this)).build();
PlayerControlView controls = findViewById(R.id.player_control_view);
final ZoomSurfaceView surface = findViewById(R.id.surface_view);
player.addVideoListener(new VideoListener() {
@Override
public void onVideoSizeChanged(int width, int height, int unappliedRotationDegrees, float pixelWidthHeightRatio) {
surface.setContentSize(width, height);
public void onVideoSizeChanged(VideoSize videoSize) {
surface.setContentSize(videoSize.width, videoSize.height);
}
});
surface.setBackgroundColor(ContextCompat.getColor(this, R.color.background));
Expand All @@ -136,9 +143,9 @@ public void onZoomSurfaceDestroyed(@NotNull ZoomSurfaceView view) { }
DataSource.Factory dataSourceFactory = new DefaultDataSourceFactory(this,
Util.getUserAgent(this, "ZoomLayoutLib"));
Uri videoUri = Uri.parse("https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4");
MediaSource videoSource = new ExtractorMediaSource.Factory(dataSourceFactory)
.createMediaSource(videoUri);
player.prepare(videoSource);
MediaSource videoSource = new ProgressiveMediaSource.Factory(dataSourceFactory)
.createMediaSource(new MediaItem.Builder().setUri(videoUri).build());
player.setMediaSource(videoSource);
}

@Override
Expand Down
8 changes: 3 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,25 @@ buildscript {
extra["minSdkVersion"] = 16
extra["compileSdkVersion"] = 29
extra["targetSdkVersion"] = 29
extra["kotlinVersion"] = "1.3.72"
extra["kotlinVersion"] = "1.5.21"

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

dependencies {
val kotlinVersion = property("kotlinVersion") as String
classpath("com.android.tools.build:gradle:4.0.0")
classpath("com.android.tools.build:gradle:4.2.0")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
classpath("com.otaliastudios.tools:publisher:0.1.5")
classpath("io.deepmedia.tools:publisher:0.6.0")
}
}

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

Expand Down
4 changes: 2 additions & 2 deletions docs/_about/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ can download the AAR package. To fetch with Gradle, make sure you add the JCente
```groovy
allprojects {
repositories {
jcenter()
//jcenter()
}
}
```
Expand All @@ -25,4 +25,4 @@ Then simply download the latest version:
implementation 'com.otaliastudios:zoomlayout:{{ site.github_version }}'
```

No other configuration steps are needed.
No other configuration steps are needed.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-all.zip
48 changes: 39 additions & 9 deletions library/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import com.otaliastudios.tools.publisher.PublisherExtension.License
import com.otaliastudios.tools.publisher.PublisherExtension.Release
import io.deepmedia.tools.publisher.common.License
import io.deepmedia.tools.publisher.common.Release

plugins {
id("com.android.library")
id("kotlin-android")
id("maven-publisher-bintray")
id("io.deepmedia.tools.publisher")
id("maven-publish")
}

android {
Expand All @@ -20,28 +21,57 @@ android {
buildTypes {
get("release").consumerProguardFile("proguard-rules.pro")
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}

packagingOptions {
exclude("META-INF/DEPENDENCIES")
exclude("META-INF/INDEX.LIST")
exclude("META-INF/library_release.kotlin_module")
}
}


dependencies {
val kotlinVersion = property("kotlinVersion") as String
api("androidx.annotation:annotation:1.1.0")
api("org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion")
api("com.otaliastudios.opengl:egloo:0.4.0")
api("com.otaliastudios.opengl:egloo:0.6.1")

testImplementation("org.junit.jupiter:junit-jupiter-api:5.3.1")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.3.1")
}

publisher {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They were using their own publishing plugin. I updated it to the latest version. Bintray publishing is disabled.

auth.user = "BINTRAY_USER"
auth.key = "BINTRAY_KEY"
auth.repo = "BINTRAY_REPO"
// Bintray publications are not allowed anymore
/*
bintray {
auth.user = "BINTRAY_USER"
auth.key = "BINTRAY_KEY"
auth.repo = "BINTRAY_REPO"
}
*/
project.group = "com.otaliastudios"
project.artifact = "zoomlayout"
project.description = "A collection of Android components that support zooming and panning of View hierarchies, images, video streams, and much more."
project.url = "https://github.com/natario1/ZoomLayout"
project.vcsUrl = "https://github.com/natario1/ZoomLayout.git"
project.addLicense(License.APACHE_2_0)
release.setSources(Release.SOURCES_AUTO)
release.setDocs(Release.DOCS_AUTO)
release.sources = Release.SOURCES_AUTO
release.docs = Release.DOCS_AUTO
}

afterEvaluate {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added "maven-publish" configuration

publishing {
publications {
create<MavenPublication>("release"){
from(components["release"])
groupId = "com.github.blubblub"
artifactId = "ZoomLayout"
version = "1.9"
}
}
}
}