Skip to content

Commit

Permalink
Release 0.6.1 (#37)
Browse files Browse the repository at this point in the history
* Update MavenPublisher, remove jcenter, enable snapshots

* Release v0.6.1

* Fix build issues
  • Loading branch information
natario1 authored Jul 2, 2021
1 parent 9e75853 commit 0dcee2b
Show file tree
Hide file tree
Showing 10 changed files with 55 additions and 57 deletions.
2 changes: 1 addition & 1 deletion .run/publishAllBintray.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$/library" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="scriptParameters" value="--stacktrace" />
<option name="taskDescriptions">
<list />
</option>
Expand Down
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.6.0")
implementation("com.otaliastudios.opengl:egloo-android:0.6.1")

// Kotlin Multiplatform projects: add egloo-multiplatform to your common source set.
implementation("com.otaliastudios.opengl:egloo-multiplatform:0.6.0")
implementation("com.otaliastudios.opengl:egloo-multiplatform:0.6.1")

// Kotlin Multiplatform projects: or use the granular dependencies:
implementation("com.otaliastudios.opengl:egloo-android:0.6.0") // Android AAR
implementation("com.otaliastudios.opengl:egloo-androidnativex86:0.6.0") // Android Native KLib
implementation("com.otaliastudios.opengl:egloo-androidnativex64:0.6.0") // Android Native KLib
implementation("com.otaliastudios.opengl:egloo-androidnativearm32:0.6.0") // Android Native KLib
implementation("com.otaliastudios.opengl:egloo-androidnativearm64:0.6.0") // Android Native KLib
implementation("com.otaliastudios.opengl:egloo-android:0.6.1") // Android AAR
implementation("com.otaliastudios.opengl:egloo-androidnativex86:0.6.1") // Android Native KLib
implementation("com.otaliastudios.opengl:egloo-androidnativex64:0.6.1") // Android Native KLib
implementation("com.otaliastudios.opengl:egloo-androidnativearm32:0.6.1") // Android Native KLib
implementation("com.otaliastudios.opengl:egloo-androidnativearm64:0.6.1") // Android Native KLib
```

## Features
Expand Down
12 changes: 4 additions & 8 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ buildscript {
repositories {
google()
mavenCentral()
jcenter()
mavenLocal()
maven("../MavenPublisher/publisher/build/prebuilt")
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/")
}

Expand All @@ -18,20 +18,16 @@ buildscript {
}

dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.31")
classpath("com.android.tools.build:gradle:4.1.1")
classpath("io.deepmedia.tools:publisher:latest-SNAPSHOT") {
isChanging = true
}
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.20")
classpath("com.android.tools.build:gradle:4.2.2")
classpath("io.deepmedia.tools:publisher:0.6.0")
}
}

allprojects {
repositories {
google()
mavenCentral()
jcenter()
// maven("https://dl.bintray.com/natario/multiplatform")
}
}

Expand Down
8 changes: 4 additions & 4 deletions demo/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ android {
}

dependencies {
implementation("androidx.appcompat:appcompat:1.2.0")
implementation("androidx.core:core-ktx:1.3.2")
implementation("com.google.android.exoplayer:exoplayer-core:2.13.2")
implementation("com.google.android.exoplayer:exoplayer-ui:2.13.2")
implementation("androidx.appcompat:appcompat:1.3.0")
implementation("androidx.core:core-ktx:1.6.0")
implementation("com.google.android.exoplayer:exoplayer-core:2.14.1")
implementation("com.google.android.exoplayer:exoplayer-ui:2.14.1")
implementation(project(":library"))

// For testing, instead of the project dependency:
Expand Down
1 change: 1 addition & 0 deletions demo/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true"
tools:ignore="GoogleAppIndexingWarning">
<activity android:name=".ShapesActivity">
<intent-filter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.*
import android.widget.Toast
import com.google.android.exoplayer2.ExoPlayerFactory
import com.google.android.exoplayer2.MediaItem
import com.google.android.exoplayer2.SimpleExoPlayer
import com.google.android.exoplayer2.source.ProgressiveMediaSource
import com.google.android.exoplayer2.upstream.DefaultDataSourceFactory
Expand Down Expand Up @@ -74,12 +74,12 @@ class VideoActivity : AppCompatActivity(), GLSurfaceView.Renderer {
setContentView(R.layout.activity_video)

// Set up the player
player = ExoPlayerFactory.newSimpleInstance(this)
player = SimpleExoPlayer.Builder(this).build()
val dataSourceFactory = DefaultDataSourceFactory(this,
Util.getUserAgent(this, "Egloo"))
val videoSource = ProgressiveMediaSource.Factory(dataSourceFactory)
// .createMediaSource(Uri.parse("https://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4"))
.createMediaSource(Uri.parse("http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"))
.createMediaSource(MediaItem.fromUri("http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"))
player.prepare(videoSource)
player.playWhenReady = true

Expand Down
6 changes: 6 additions & 0 deletions docs/_about/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ 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.6.1

- Upgrade to Kotlin 1.5.20 ([#37][37])
- Enable snapshot releases ([#37][37])

### v0.6.0

- Upgrade to Kotlin 1.4.31 ([#33][33])
Expand Down Expand Up @@ -88,3 +93,4 @@ First versioned release.
[23]: https://github.com/natario1/Egloo/pull/23
[31]: https://github.com/natario1/Egloo/pull/31
[33]: https://github.com/natario1/Egloo/pull/33
[37]: https://github.com/natario1/Egloo/pull/37
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.6.0
github_version: 0.6.1
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.6-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-all.zip
59 changes: 27 additions & 32 deletions library/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,37 +13,29 @@ plugins {
id("io.deepmedia.tools.publisher")
}

fun KotlinMultiplatformExtension.newSourceSet(name: String, vararg parents: KotlinSourceSet): KotlinSourceSet {
return sourceSets.maybeCreate(name).apply {
parents.forEach { dependsOn(it) }
}
}

// Ideally we'd have common -> androidNative -> androidNative32/64 -> androidNativeXXX, but the
// commonizer currently only works on sets whose direct children are the final targets.
// So we need to move androidNative closer to the final targets and create two chains instead:
// 1. common -> androidNative -----------------------> androidNativeXXX
// 2. \------> androidNative32/64 -------/
// https://kotlinlang.org/docs/reference/mpp-share-on-platforms.html
fun KotlinMultiplatformExtension.androidNative(name: String = "androidNative", configure: KotlinNativeTarget.() -> Unit) {
val commonMain = sourceSets["commonMain"]
val commonTest = sourceSets["commonTest"]
val androidNativeMain = newSourceSet("${name}Main", commonMain)
val androidNativeTest = newSourceSet("${name}Test", commonTest)
val androidNative32BitMain = newSourceSet("${name}32BitMain", androidNativeMain)
val androidNative64BitMain = newSourceSet("${name}64BitMain", androidNativeMain)
val androidNative32BitTest = newSourceSet("${name}32BitTest", androidNativeTest)
val androidNative64BitTest = newSourceSet("${name}64BitTest", androidNativeTest)

val androidNativeMain = sourceSets.create("${name}Main") { dependsOn(commonMain) }
val androidNativeTest = sourceSets.create("${name}Test") { dependsOn(commonTest) }

val androidNative32BitMain = sourceSets.create("${name}32BitMain") { dependsOn(androidNativeMain) }
val androidNative64BitMain = sourceSets.create("${name}64BitMain") { dependsOn(androidNativeMain) }
val androidNative32BitTest = sourceSets.create("${name}32BitTest") { dependsOn(androidNativeTest) }
val androidNative64BitTest = sourceSets.create("${name}64BitTest") { dependsOn(androidNativeTest) }

val targets32 = listOf(androidNativeX86(), androidNativeArm32())
val targets64 = listOf(androidNativeX64(), androidNativeArm64())
targets32.forEach {
newSourceSet(it.compilations["main"].defaultSourceSetName, androidNativeMain, androidNative32BitMain)
newSourceSet(it.compilations["test"].defaultSourceSetName, androidNativeTest, androidNative32BitTest)
it.compilations["main"].defaultSourceSet.dependsOn(androidNative32BitMain)
it.compilations["test"].defaultSourceSet.dependsOn(androidNative32BitTest)
it.configure()
}
targets64.forEach {
newSourceSet(it.compilations["main"].defaultSourceSetName, androidNativeMain, androidNative64BitMain)
newSourceSet(it.compilations["test"].defaultSourceSetName, androidNativeTest, androidNative64BitTest)
it.compilations["main"].defaultSourceSet.dependsOn(androidNative64BitMain)
it.compilations["test"].defaultSourceSet.dependsOn(androidNative64BitTest)
it.configure()
}
}
Expand All @@ -62,7 +54,7 @@ kotlin {
sourceSets {
getByName("androidJvmMain") {
dependencies {
api("androidx.annotation:annotation:1.1.0")
api("androidx.annotation:annotation:1.2.0")
}
}
configureEach {
Expand All @@ -82,7 +74,7 @@ android {
defaultConfig {
setMinSdkVersion(property("androidMinSdkVersion") as Int)
setTargetSdkVersion(property("androidTargetSdkVersion") as Int)
versionName = "0.6.0"
versionName = "0.6.1"
}
buildTypes["release"].consumerProguardFile("proguard-rules.pro")
sourceSets["main"].java.srcDirs("src/androidJvmMain/kotlin")
Expand All @@ -103,7 +95,6 @@ publisher {
project.scm = GithubScm("natario1", "Egloo")
project.addLicense(License.MIT)
project.addDeveloper("natario1", "[email protected]")
release.docs = Release.DOCS_AUTO
val dir = "../prebuilt"

// Kotlin creates MavenPublication objects with a specific name.
Expand All @@ -122,36 +113,38 @@ publisher {
multiplatformPublications.forEach { (mavenPublication, artifactId) ->
deployLocally.dependsOn("publishToDirectory${mavenPublication.capitalize()}")
directory(mavenPublication) {
setPublication(mavenPublication, clone = true)
directory = dir
publication = mavenPublication
project.name = artifactId
project.artifact = artifactId
release.docs = Release.DOCS_AUTO
}

deploySonatypeReleases.dependsOn("publishToSonatype${mavenPublication.capitalize()}")
sonatype(mavenPublication) {
setPublication(mavenPublication, clone = true)
auth.user = "SONATYPE_USER"
auth.password = "SONATYPE_PASSWORD"
signing.key = "SIGNING_KEY"
signing.password = "SIGNING_PASSWORD"
publication = mavenPublication
project.name = artifactId
project.artifact = artifactId
release.docs = Release.DOCS_AUTO
}

// TODO can't work, version overrides the other sonatype version! Need to fix this in publisher plugin
/* deploySonatypeSnapshots.dependsOn("publishToSonatype${mavenPublication.capitalize()}Snapshot")
deploySonatypeSnapshots.dependsOn("publishToSonatype${mavenPublication.capitalize()}Snapshot")
sonatype(mavenPublication + "Snapshot") {
setPublication(mavenPublication, clone = true)
repository = Sonatype.OSSRH_SNAPSHOT_1
release.version = "latest-SNAPSHOT"
auth.user = "SONATYPE_USER"
auth.password = "SONATYPE_PASSWORD"
signing.key = "SIGNING_KEY"
signing.password = "SIGNING_PASSWORD"
publication = mavenPublication
project.name = artifactId
project.artifact = artifactId
} */
release.docs = Release.DOCS_AUTO
}
}

// Legacy android release (:egloo)
Expand All @@ -161,6 +154,7 @@ publisher {
component = "release"
project.name = "Egloo"
project.artifact = "egloo"
release.docs = Release.DOCS_AUTO
release.sources = Release.SOURCES_AUTO
}

Expand All @@ -173,16 +167,17 @@ publisher {
component = "release"
project.name = "Egloo"
project.artifact = "egloo"
release.docs = Release.DOCS_AUTO
release.sources = Release.SOURCES_AUTO
}
}

/* afterEvaluate {
afterEvaluate {
val publishing = project.publishing
publishing.publications.filterIsInstance<MavenPublication>().forEach {
println("Analyzing publication ${it.name}...")
it.artifacts.forEach {
println(" - artifact ext=${it.extension} classifier=${it.classifier}")
}
}
} */
}

0 comments on commit 0dcee2b

Please sign in to comment.