From 320ee0302e3a95254bd90092d66e504ffb88dd0e Mon Sep 17 00:00:00 2001 From: Mattia Iavarone Date: Mon, 25 Jan 2021 17:20:03 +0100 Subject: [PATCH] Upgrade to Kotlin 1.4.21, release v0.5.4 (#31) * Upgrade to Kotlin 1.4.21, release v0.5.4 * master > main * Fix demo --- .github/workflows/build.yml | 2 +- .run/publishAllDirectory.run.xml | 21 +++++++++++++++++++ README.md | 14 ++++++------- build.gradle.kts | 11 +++++----- demo/build.gradle.kts | 6 +++--- .../opengl/demo/ShapesActivity.kt | 8 +++---- .../opengl/demo/VideoActivity.kt | 8 +++---- docs/_about/changelog.md | 4 ++++ docs/_config.yml | 2 +- gradle/wrapper/gradle-wrapper.properties | 2 +- library/build.gradle.kts | 21 +++++++++---------- 11 files changed, 62 insertions(+), 37 deletions(-) create mode 100644 .run/publishAllDirectory.run.xml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7b4b6ef..62144b0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,7 +4,7 @@ name: Build on: push: branches: - - master + - main pull_request: jobs: ANDROID_BASE_CHECKS: diff --git a/.run/publishAllDirectory.run.xml b/.run/publishAllDirectory.run.xml new file mode 100644 index 0000000..9aa19b7 --- /dev/null +++ b/.run/publishAllDirectory.run.xml @@ -0,0 +1,21 @@ + + + + + + + true + + + \ No newline at end of file diff --git a/README.md b/README.md index 7da073d..f24fa10 100644 --- a/README.md +++ b/README.md @@ -38,17 +38,17 @@ but other targets like iOS can probably be added easily. ```kotlin // Regular Android projects -implementation("com.otaliastudios.opengl:egloo-android:0.5.3") +implementation("com.otaliastudios.opengl:egloo-android:0.5.4") // Kotlin Multiplatform projects: add egloo-multiplatform to your common source set. -implementation("com.otaliastudios.opengl:egloo-multiplatform:0.5.3") +implementation("com.otaliastudios.opengl:egloo-multiplatform:0.5.4") // Kotlin Multiplatform projects: or use the granular dependencies: -implementation("com.otaliastudios.opengl:egloo-android:0.5.3") // Android AAR -implementation("com.otaliastudios.opengl:egloo-androidnativex86:0.5.3") // Android Native KLib -implementation("com.otaliastudios.opengl:egloo-androidnativex64:0.5.3") // Android Native KLib -implementation("com.otaliastudios.opengl:egloo-androidnativearm32:0.5.3") // Android Native KLib -implementation("com.otaliastudios.opengl:egloo-androidnativearm64:0.5.3") // Android Native KLib +implementation("com.otaliastudios.opengl:egloo-android:0.5.4") // Android AAR +implementation("com.otaliastudios.opengl:egloo-androidnativex86:0.5.4") // Android Native KLib +implementation("com.otaliastudios.opengl:egloo-androidnativex64:0.5.4") // Android Native KLib +implementation("com.otaliastudios.opengl:egloo-androidnativearm32:0.5.4") // Android Native KLib +implementation("com.otaliastudios.opengl:egloo-androidnativearm64:0.5.4") // Android Native KLib ``` ## Features diff --git a/build.gradle.kts b/build.gradle.kts index 1bfe086..268fa4c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,18 +1,19 @@ buildscript { extra["androidMinSdkVersion"] = 18 - extra["androidCompileSdkVersion"] = 29 - extra["androidTargetSdkVersion"] = 29 + extra["androidCompileSdkVersion"] = 30 + extra["androidTargetSdkVersion"] = 30 repositories { google() mavenCentral() jcenter() + mavenLocal() } dependencies { - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.0") - classpath("com.android.tools.build:gradle:4.0.1") - classpath("com.otaliastudios.tools:publisher:0.3.3") + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.21") + classpath("com.android.tools.build:gradle:4.1.1") + classpath("io.deepmedia.tools:publisher:0.4.1") } } diff --git a/demo/build.gradle.kts b/demo/build.gradle.kts index 00d1f53..1a443d1 100644 --- a/demo/build.gradle.kts +++ b/demo/build.gradle.kts @@ -8,7 +8,7 @@ android { setCompileSdkVersion(property("androidCompileSdkVersion") as Int) defaultConfig { - applicationId = "com.otaliastudios.zoom.demo" + applicationId = "com.otaliastudios.opengl.demo" setMinSdkVersion(property("androidMinSdkVersion") as Int) setTargetSdkVersion(property("androidTargetSdkVersion") as Int) versionCode = 1 @@ -22,8 +22,8 @@ android { } dependencies { - implementation("androidx.appcompat:appcompat:1.1.0") - implementation("androidx.core:core-ktx:1.1.0") + implementation("androidx.appcompat:appcompat:1.2.0") + implementation("androidx.core:core-ktx:1.3.2") implementation("com.google.android.exoplayer:exoplayer-core:2.10.4") implementation("com.google.android.exoplayer:exoplayer-ui:2.10.4") implementation(project(":library")) diff --git a/demo/src/main/java/com/otaliastudios/opengl/demo/ShapesActivity.kt b/demo/src/main/java/com/otaliastudios/opengl/demo/ShapesActivity.kt index a59515e..8fd4251 100644 --- a/demo/src/main/java/com/otaliastudios/opengl/demo/ShapesActivity.kt +++ b/demo/src/main/java/com/otaliastudios/opengl/demo/ShapesActivity.kt @@ -53,16 +53,16 @@ class ShapesActivity : AppCompatActivity() { surfaceView.setZOrderOnTop(true) surfaceView.holder.setFormat(PixelFormat.RGBA_8888) surfaceView.holder.addCallback(object : SurfaceHolder.Callback { - override fun surfaceCreated(holder: SurfaceHolder?) { + override fun surfaceCreated(holder: SurfaceHolder) { onSurfaceCreated() } - override fun surfaceChanged(holder: SurfaceHolder?, format: Int, width: Int, height: Int) { + override fun surfaceChanged(holder: SurfaceHolder, format: Int, width: Int, height: Int) { GLES20.glViewport(0, 0, width, height) scene.setViewportSize(width, height) } - override fun surfaceDestroyed(holder: SurfaceHolder?) { + override fun surfaceDestroyed(holder: SurfaceHolder) { onSurfaceDestroyed() } }) @@ -145,7 +145,7 @@ class ShapesActivity : AppCompatActivity() { return true } - override fun onOptionsItemSelected(item: MenuItem?): Boolean { + override fun onOptionsItemSelected(item: MenuItem): Boolean { startActivity(Intent(this, VideoActivity::class.java)) onSurfaceDestroyed() finish() diff --git a/demo/src/main/java/com/otaliastudios/opengl/demo/VideoActivity.kt b/demo/src/main/java/com/otaliastudios/opengl/demo/VideoActivity.kt index b04fac3..8ba8f71 100644 --- a/demo/src/main/java/com/otaliastudios/opengl/demo/VideoActivity.kt +++ b/demo/src/main/java/com/otaliastudios/opengl/demo/VideoActivity.kt @@ -92,9 +92,9 @@ class VideoActivity : AppCompatActivity(), GLSurfaceView.Renderer { glSurfaceView.setRenderer(this) glSurfaceView.renderMode = GLSurfaceView.RENDERMODE_WHEN_DIRTY glSurfaceView.holder.addCallback(object : SurfaceHolder.Callback { - override fun surfaceCreated(holder: SurfaceHolder?) {} - override fun surfaceChanged(holder: SurfaceHolder?, format: Int, width: Int, height: Int) {} - override fun surfaceDestroyed(holder: SurfaceHolder?) { + override fun surfaceCreated(holder: SurfaceHolder) {} + override fun surfaceChanged(holder: SurfaceHolder, format: Int, width: Int, height: Int) {} + override fun surfaceDestroyed(holder: SurfaceHolder) { onSurfaceDestroyed() } }) @@ -198,7 +198,7 @@ class VideoActivity : AppCompatActivity(), GLSurfaceView.Renderer { return true } - override fun onOptionsItemSelected(item: MenuItem?): Boolean { + override fun onOptionsItemSelected(item: MenuItem): Boolean { startActivity(Intent(this, ShapesActivity::class.java)) onSurfaceDestroyed() finish() diff --git a/docs/_about/changelog.md b/docs/_about/changelog.md index 6c76b50..3438b7d 100644 --- a/docs/_about/changelog.md +++ b/docs/_about/changelog.md @@ -9,6 +9,10 @@ New versions are released through GitHub, so the reference page is the [GitHub R Starting from v0.3.1, you can [support development](https://github.com/sponsors/natario1) through the GitHub Sponsors program. Companies can share a tiny part of their revenue and get private support hours in return. Thanks! +### v0.5.4 + +- Upgrade to Kotlin 1.4.21 ([#31][31]) + ### v0.5.3 - New: Upgrade to Kotlin 1.4 ([#27][27]) diff --git a/docs/_config.yml b/docs/_config.yml index 71ad2d2..6cb33f2 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -12,7 +12,7 @@ google_analytics_id: 'UA-155077779-3' google_site_verification: '4x49i17ABIrSvUl52SeL0-t0341aTnWWaC62-FYCRT4' github: [metadata] # TODO What's this? github_repo: Egloo -github_version: 0.5.3 +github_version: 0.5.4 github_branch: master baseurl: '/Egloo' # Keep as an empty string if served up at the root collections: diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 3328472..5bba726 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -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.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.6-all.zip diff --git a/library/build.gradle.kts b/library/build.gradle.kts index a74cccc..61017bf 100644 --- a/library/build.gradle.kts +++ b/library/build.gradle.kts @@ -1,5 +1,5 @@ -import com.otaliastudios.tools.publisher.common.License -import com.otaliastudios.tools.publisher.common.Release +import io.deepmedia.tools.publisher.common.License +import io.deepmedia.tools.publisher.common.Release import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension @@ -7,8 +7,7 @@ import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension plugins { id("com.android.library") id("kotlin-multiplatform") - id("com.otaliastudios.tools.publisher") - id("maven-publish") + id("io.deepmedia.tools.publisher") } fun KotlinMultiplatformExtension.newSourceSet(name: String, vararg parents: KotlinSourceSet): KotlinSourceSet { @@ -105,16 +104,16 @@ publisher { component = "release" project.name = "Egloo" project.artifact = "egloo" - release.setSources(Release.SOURCES_AUTO) - release.setDocs(Release.DOCS_AUTO) + release.sources = Release.SOURCES_AUTO + release.docs = Release.DOCS_AUTO } directory("legacy") { directory = dir component = "release" project.name = "Egloo" project.artifact = "egloo" - release.setSources(Release.SOURCES_AUTO) - release.setDocs(Release.DOCS_AUTO) + release.sources = Release.SOURCES_AUTO + release.docs = Release.DOCS_AUTO } // Kotlin creates MavenPublication objects with a specific name. @@ -126,8 +125,8 @@ publisher { "androidNativeArm64" to "egloo-androidnativearm64", "androidNativeX86" to "egloo-androidnativex86", "androidNativeX64" to "egloo-androidnativex64", - "kotlinMultiplatform" to "egloo-multiplatform", - "metadata" to "egloo-metadata" + "kotlinMultiplatform" to "egloo-multiplatform" + // "metadata" to "egloo-metadata" - removed in Kotlin 1.4.20 or so ) multiplatformPublications.forEach { (mavenPublication, artifactId) -> bintray(mavenPublication) { @@ -138,7 +137,7 @@ publisher { project.name = artifactId project.artifact = artifactId if (artifactId == "egloo-android") { - release.setDocs(Release.DOCS_AUTO) + release.docs = Release.DOCS_AUTO } } directory(mavenPublication) {