Skip to content

Commit 0dcee2b

Browse files
authored
Release 0.6.1 (#37)
* Update MavenPublisher, remove jcenter, enable snapshots * Release v0.6.1 * Fix build issues
1 parent 9e75853 commit 0dcee2b

File tree

10 files changed

+55
-57
lines changed

10 files changed

+55
-57
lines changed

.run/publishAllBintray.run.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<option name="executionName" />
55
<option name="externalProjectPath" value="$PROJECT_DIR$/library" />
66
<option name="externalSystemIdString" value="GRADLE" />
7-
<option name="scriptParameters" value="" />
7+
<option name="scriptParameters" value="--stacktrace" />
88
<option name="taskDescriptions">
99
<list />
1010
</option>

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,17 @@ but other targets like iOS can probably be added easily.
3838

3939
```kotlin
4040
// Regular Android projects
41-
implementation("com.otaliastudios.opengl:egloo-android:0.6.0")
41+
implementation("com.otaliastudios.opengl:egloo-android:0.6.1")
4242

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

4646
// Kotlin Multiplatform projects: or use the granular dependencies:
47-
implementation("com.otaliastudios.opengl:egloo-android:0.6.0") // Android AAR
48-
implementation("com.otaliastudios.opengl:egloo-androidnativex86:0.6.0") // Android Native KLib
49-
implementation("com.otaliastudios.opengl:egloo-androidnativex64:0.6.0") // Android Native KLib
50-
implementation("com.otaliastudios.opengl:egloo-androidnativearm32:0.6.0") // Android Native KLib
51-
implementation("com.otaliastudios.opengl:egloo-androidnativearm64:0.6.0") // Android Native KLib
47+
implementation("com.otaliastudios.opengl:egloo-android:0.6.1") // Android AAR
48+
implementation("com.otaliastudios.opengl:egloo-androidnativex86:0.6.1") // Android Native KLib
49+
implementation("com.otaliastudios.opengl:egloo-androidnativex64:0.6.1") // Android Native KLib
50+
implementation("com.otaliastudios.opengl:egloo-androidnativearm32:0.6.1") // Android Native KLib
51+
implementation("com.otaliastudios.opengl:egloo-androidnativearm64:0.6.1") // Android Native KLib
5252
```
5353

5454
## Features

build.gradle.kts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ buildscript {
66
repositories {
77
google()
88
mavenCentral()
9-
jcenter()
109
mavenLocal()
10+
maven("../MavenPublisher/publisher/build/prebuilt")
1111
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/")
1212
}
1313

@@ -18,20 +18,16 @@ buildscript {
1818
}
1919

2020
dependencies {
21-
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.31")
22-
classpath("com.android.tools.build:gradle:4.1.1")
23-
classpath("io.deepmedia.tools:publisher:latest-SNAPSHOT") {
24-
isChanging = true
25-
}
21+
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.20")
22+
classpath("com.android.tools.build:gradle:4.2.2")
23+
classpath("io.deepmedia.tools:publisher:0.6.0")
2624
}
2725
}
2826

2927
allprojects {
3028
repositories {
3129
google()
3230
mavenCentral()
33-
jcenter()
34-
// maven("https://dl.bintray.com/natario/multiplatform")
3531
}
3632
}
3733

demo/build.gradle.kts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ android {
2222
}
2323

2424
dependencies {
25-
implementation("androidx.appcompat:appcompat:1.2.0")
26-
implementation("androidx.core:core-ktx:1.3.2")
27-
implementation("com.google.android.exoplayer:exoplayer-core:2.13.2")
28-
implementation("com.google.android.exoplayer:exoplayer-ui:2.13.2")
25+
implementation("androidx.appcompat:appcompat:1.3.0")
26+
implementation("androidx.core:core-ktx:1.6.0")
27+
implementation("com.google.android.exoplayer:exoplayer-core:2.14.1")
28+
implementation("com.google.android.exoplayer:exoplayer-ui:2.14.1")
2929
implementation(project(":library"))
3030

3131
// For testing, instead of the project dependency:

demo/src/main/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
android:label="@string/app_name"
1212
android:supportsRtl="true"
1313
android:theme="@style/AppTheme"
14+
android:usesCleartextTraffic="true"
1415
tools:ignore="GoogleAppIndexingWarning">
1516
<activity android:name=".ShapesActivity">
1617
<intent-filter>

demo/src/main/java/com/otaliastudios/opengl/demo/VideoActivity.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import androidx.appcompat.app.AppCompatActivity
1313
import android.os.Bundle
1414
import android.view.*
1515
import android.widget.Toast
16-
import com.google.android.exoplayer2.ExoPlayerFactory
16+
import com.google.android.exoplayer2.MediaItem
1717
import com.google.android.exoplayer2.SimpleExoPlayer
1818
import com.google.android.exoplayer2.source.ProgressiveMediaSource
1919
import com.google.android.exoplayer2.upstream.DefaultDataSourceFactory
@@ -74,12 +74,12 @@ class VideoActivity : AppCompatActivity(), GLSurfaceView.Renderer {
7474
setContentView(R.layout.activity_video)
7575

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

docs/_about/changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ New versions are released through GitHub, so the reference page is the [GitHub R
99
Starting from v0.3.1, you can [support development](https://github.com/sponsors/natario1) through the GitHub Sponsors program.
1010
Companies can share a tiny part of their revenue and get private support hours in return. Thanks!
1111

12+
### v0.6.1
13+
14+
- Upgrade to Kotlin 1.5.20 ([#37][37])
15+
- Enable snapshot releases ([#37][37])
16+
1217
### v0.6.0
1318

1419
- Upgrade to Kotlin 1.4.31 ([#33][33])
@@ -88,3 +93,4 @@ First versioned release.
8893
[23]: https://github.com/natario1/Egloo/pull/23
8994
[31]: https://github.com/natario1/Egloo/pull/31
9095
[33]: https://github.com/natario1/Egloo/pull/33
96+
[37]: https://github.com/natario1/Egloo/pull/37

docs/_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ google_analytics_id: 'UA-155077779-3'
1212
google_site_verification: '4x49i17ABIrSvUl52SeL0-t0341aTnWWaC62-FYCRT4'
1313
github: [metadata] # TODO What's this?
1414
github_repo: Egloo
15-
github_version: 0.6.0
15+
github_version: 0.6.1
1616
github_branch: master
1717
baseurl: '/Egloo' # Keep as an empty string if served up at the root
1818
collections:

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-all.zip

library/build.gradle.kts

Lines changed: 27 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -13,37 +13,29 @@ plugins {
1313
id("io.deepmedia.tools.publisher")
1414
}
1515

16-
fun KotlinMultiplatformExtension.newSourceSet(name: String, vararg parents: KotlinSourceSet): KotlinSourceSet {
17-
return sourceSets.maybeCreate(name).apply {
18-
parents.forEach { dependsOn(it) }
19-
}
20-
}
21-
22-
// Ideally we'd have common -> androidNative -> androidNative32/64 -> androidNativeXXX, but the
23-
// commonizer currently only works on sets whose direct children are the final targets.
24-
// So we need to move androidNative closer to the final targets and create two chains instead:
25-
// 1. common -> androidNative -----------------------> androidNativeXXX
26-
// 2. \------> androidNative32/64 -------/
2716
// https://kotlinlang.org/docs/reference/mpp-share-on-platforms.html
2817
fun KotlinMultiplatformExtension.androidNative(name: String = "androidNative", configure: KotlinNativeTarget.() -> Unit) {
2918
val commonMain = sourceSets["commonMain"]
3019
val commonTest = sourceSets["commonTest"]
31-
val androidNativeMain = newSourceSet("${name}Main", commonMain)
32-
val androidNativeTest = newSourceSet("${name}Test", commonTest)
33-
val androidNative32BitMain = newSourceSet("${name}32BitMain", androidNativeMain)
34-
val androidNative64BitMain = newSourceSet("${name}64BitMain", androidNativeMain)
35-
val androidNative32BitTest = newSourceSet("${name}32BitTest", androidNativeTest)
36-
val androidNative64BitTest = newSourceSet("${name}64BitTest", androidNativeTest)
20+
21+
val androidNativeMain = sourceSets.create("${name}Main") { dependsOn(commonMain) }
22+
val androidNativeTest = sourceSets.create("${name}Test") { dependsOn(commonTest) }
23+
24+
val androidNative32BitMain = sourceSets.create("${name}32BitMain") { dependsOn(androidNativeMain) }
25+
val androidNative64BitMain = sourceSets.create("${name}64BitMain") { dependsOn(androidNativeMain) }
26+
val androidNative32BitTest = sourceSets.create("${name}32BitTest") { dependsOn(androidNativeTest) }
27+
val androidNative64BitTest = sourceSets.create("${name}64BitTest") { dependsOn(androidNativeTest) }
28+
3729
val targets32 = listOf(androidNativeX86(), androidNativeArm32())
3830
val targets64 = listOf(androidNativeX64(), androidNativeArm64())
3931
targets32.forEach {
40-
newSourceSet(it.compilations["main"].defaultSourceSetName, androidNativeMain, androidNative32BitMain)
41-
newSourceSet(it.compilations["test"].defaultSourceSetName, androidNativeTest, androidNative32BitTest)
32+
it.compilations["main"].defaultSourceSet.dependsOn(androidNative32BitMain)
33+
it.compilations["test"].defaultSourceSet.dependsOn(androidNative32BitTest)
4234
it.configure()
4335
}
4436
targets64.forEach {
45-
newSourceSet(it.compilations["main"].defaultSourceSetName, androidNativeMain, androidNative64BitMain)
46-
newSourceSet(it.compilations["test"].defaultSourceSetName, androidNativeTest, androidNative64BitTest)
37+
it.compilations["main"].defaultSourceSet.dependsOn(androidNative64BitMain)
38+
it.compilations["test"].defaultSourceSet.dependsOn(androidNative64BitTest)
4739
it.configure()
4840
}
4941
}
@@ -62,7 +54,7 @@ kotlin {
6254
sourceSets {
6355
getByName("androidJvmMain") {
6456
dependencies {
65-
api("androidx.annotation:annotation:1.1.0")
57+
api("androidx.annotation:annotation:1.2.0")
6658
}
6759
}
6860
configureEach {
@@ -82,7 +74,7 @@ android {
8274
defaultConfig {
8375
setMinSdkVersion(property("androidMinSdkVersion") as Int)
8476
setTargetSdkVersion(property("androidTargetSdkVersion") as Int)
85-
versionName = "0.6.0"
77+
versionName = "0.6.1"
8678
}
8779
buildTypes["release"].consumerProguardFile("proguard-rules.pro")
8880
sourceSets["main"].java.srcDirs("src/androidJvmMain/kotlin")
@@ -103,7 +95,6 @@ publisher {
10395
project.scm = GithubScm("natario1", "Egloo")
10496
project.addLicense(License.MIT)
10597
project.addDeveloper("natario1", "[email protected]")
106-
release.docs = Release.DOCS_AUTO
10798
val dir = "../prebuilt"
10899

109100
// Kotlin creates MavenPublication objects with a specific name.
@@ -122,36 +113,38 @@ publisher {
122113
multiplatformPublications.forEach { (mavenPublication, artifactId) ->
123114
deployLocally.dependsOn("publishToDirectory${mavenPublication.capitalize()}")
124115
directory(mavenPublication) {
116+
setPublication(mavenPublication, clone = true)
125117
directory = dir
126-
publication = mavenPublication
127118
project.name = artifactId
128119
project.artifact = artifactId
120+
release.docs = Release.DOCS_AUTO
129121
}
130122

131123
deploySonatypeReleases.dependsOn("publishToSonatype${mavenPublication.capitalize()}")
132124
sonatype(mavenPublication) {
125+
setPublication(mavenPublication, clone = true)
133126
auth.user = "SONATYPE_USER"
134127
auth.password = "SONATYPE_PASSWORD"
135128
signing.key = "SIGNING_KEY"
136129
signing.password = "SIGNING_PASSWORD"
137-
publication = mavenPublication
138130
project.name = artifactId
139131
project.artifact = artifactId
132+
release.docs = Release.DOCS_AUTO
140133
}
141134

142-
// TODO can't work, version overrides the other sonatype version! Need to fix this in publisher plugin
143-
/* deploySonatypeSnapshots.dependsOn("publishToSonatype${mavenPublication.capitalize()}Snapshot")
135+
deploySonatypeSnapshots.dependsOn("publishToSonatype${mavenPublication.capitalize()}Snapshot")
144136
sonatype(mavenPublication + "Snapshot") {
137+
setPublication(mavenPublication, clone = true)
145138
repository = Sonatype.OSSRH_SNAPSHOT_1
146139
release.version = "latest-SNAPSHOT"
147140
auth.user = "SONATYPE_USER"
148141
auth.password = "SONATYPE_PASSWORD"
149142
signing.key = "SIGNING_KEY"
150143
signing.password = "SIGNING_PASSWORD"
151-
publication = mavenPublication
152144
project.name = artifactId
153145
project.artifact = artifactId
154-
} */
146+
release.docs = Release.DOCS_AUTO
147+
}
155148
}
156149

157150
// Legacy android release (:egloo)
@@ -161,6 +154,7 @@ publisher {
161154
component = "release"
162155
project.name = "Egloo"
163156
project.artifact = "egloo"
157+
release.docs = Release.DOCS_AUTO
164158
release.sources = Release.SOURCES_AUTO
165159
}
166160

@@ -173,16 +167,17 @@ publisher {
173167
component = "release"
174168
project.name = "Egloo"
175169
project.artifact = "egloo"
170+
release.docs = Release.DOCS_AUTO
176171
release.sources = Release.SOURCES_AUTO
177172
}
178173
}
179174

180-
/* afterEvaluate {
175+
afterEvaluate {
181176
val publishing = project.publishing
182177
publishing.publications.filterIsInstance<MavenPublication>().forEach {
183178
println("Analyzing publication ${it.name}...")
184179
it.artifacts.forEach {
185180
println(" - artifact ext=${it.extension} classifier=${it.classifier}")
186181
}
187182
}
188-
} */
183+
}

0 commit comments

Comments
 (0)