Skip to content

Commit

Permalink
Upgrade to Kotlin 1.4.21, release v0.5.4 (#31)
Browse files Browse the repository at this point in the history
* Upgrade to Kotlin 1.4.21, release v0.5.4

* master > main

* Fix demo
  • Loading branch information
natario1 authored Jan 25, 2021
1 parent 6277ec1 commit 320ee03
Show file tree
Hide file tree
Showing 11 changed files with 62 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Build
on:
push:
branches:
- master
- main
pull_request:
jobs:
ANDROID_BASE_CHECKS:
Expand Down
21 changes: 21 additions & 0 deletions .run/publishAllDirectory.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="publishAllDirectory" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$/library" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="publishAllDirectory" />
</list>
</option>
<option name="vmOptions" value="" />
</ExternalSystemSettings>
<GradleScriptDebugEnabled>true</GradleScriptDebugEnabled>
<method v="2" />
</configuration>
</component>
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 6 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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")
}
}

Expand Down
6 changes: 3 additions & 3 deletions demo/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
})
Expand Down Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
})
Expand Down Expand Up @@ -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()
Expand Down
4 changes: 4 additions & 0 deletions docs/_about/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down
2 changes: 1 addition & 1 deletion docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
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.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6-all.zip
21 changes: 10 additions & 11 deletions library/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
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

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 {
Expand Down Expand Up @@ -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.
Expand All @@ -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) {
Expand All @@ -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) {
Expand Down

0 comments on commit 320ee03

Please sign in to comment.