Skip to content

Commit 579049f

Browse files
authored
Multiplatform publish (#22)
* Multiplatform publishing * Update demo app * Release v0.5.1 * New publishing model * Release 0.5.1, fix publish bugs * Fix deploy secrets * -xmx tweak
1 parent 9100ee8 commit 579049f

File tree

13 files changed

+143
-71
lines changed

13 files changed

+143
-71
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ jobs:
1616
with:
1717
java-version: 1.8
1818
- name: Perform base checks
19-
run: ./gradlew demo:assembleDebug library:dokka
19+
run: ./gradlew demo:assembleDebug library:publishAllDirectory

.github/workflows/deploy.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ jobs:
1111
BINTRAY_USER: ${{ secrets.BINTRAY_USER }}
1212
BINTRAY_KEY: ${{ secrets.BINTRAY_KEY }}
1313
BINTRAY_REPO: ${{ secrets.BINTRAY_REPO }}
14+
BINTRAY_REPO_LEGACY: ${{ secrets.BINTRAY_REPO_LEGACY }}
1415
steps:
1516
- uses: actions/checkout@v2
1617
- uses: actions/setup-java@v1
1718
with:
1819
java-version: 1.8
1920
- name: Perform bintray upload
20-
run: ./gradlew bintrayUpload
21+
run: ./gradlew library:publishAllBintray

README.md

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,37 @@
1919
# Egloo
2020

2121
Egloo is a simple and lightweight multiplatform framework for OpenGL ES drawing and EGL management
22-
that uses object-oriented components - hence the name Egl**oo**. It can serve as a basis for
22+
that uses object-oriented components - hence the name Egl**oo**. It can serve as a basis for
2323
complex drawing operations, but is mostly designed for helping in making common tasks simpler,
2424
even for people that do not have any OpenGL experience.
2525

26-
Approaching OpenGL from Android can be hard because of the deep differences in the OpenGL API design
26+
Approaching OpenGL from high-level languages can be hard because of the deep differences in the OpenGL API design
2727
with respect to a typical object-oriented context. Egloo tries to take some of these difficulties away
2828
by creating a **thin**, flexible layer of abstraction around EGL and GLES calls.
2929

30-
You can take a look at the demo app or see Egloo in action in more popular projects:
30+
You can take a look at the demo app or see Egloo in action in some popular Android projects:
3131

3232
- for camera preview and real-time filters: see [CameraView](https://github.com/natario1/CameraView)
3333
- in a zoomable Surface: see [ZoomLayout](https://github.com/natario1/ZoomLayout)
3434
- for transcoding videos: see [Transcoder](https://github.com/natario1/Transcoder)
3535

36-
```groovy
37-
implementation 'com.otaliastudios.opengl:egloo:0.5.0'
38-
```
39-
4036
Starting from 0.5.0, Egloo can run on native targets. We provide an implementation for Android native libraries,
41-
but other targets like iOS can probably be added easily. These artifacts are not currently published
42-
but can be built using `./gradlew :library:publishLocal` .
37+
but other targets like iOS can probably be added easily.
38+
39+
```kotlin
40+
// Regular Android projects
41+
implementation("com.otaliastudios.opengl:egloo-android:0.5.1")
42+
43+
// Kotlin Multiplatform projects: add egloo-multiplatform to your common source set.
44+
implementation("com.otaliastudios.opengl:egloo-multiplatform:0.5.1")
45+
46+
// Kotlin Multiplatform projects: or use the granular dependencies:
47+
implementation("com.otaliastudios.opengl:egloo-android:0.5.1") // Android AAR
48+
implementation("com.otaliastudios.opengl:egloo-androidnativex86:0.5.1") // Android Native KLib
49+
implementation("com.otaliastudios.opengl:egloo-androidnativex64:0.5.1") // Android Native KLib
50+
implementation("com.otaliastudios.opengl:egloo-androidnativearm32:0.5.1") // Android Native KLib
51+
implementation("com.otaliastudios.opengl:egloo-androidnativearm64:0.5.1") // Android Native KLib
52+
```
4353

4454
## Features
4555

@@ -49,6 +59,7 @@ but can be built using `./gradlew :library:publishLocal` .
4959
- Programs abstraction [[docs]](https://natario1.github.io/docs/programs)
5060
- Scenes to hold view and projection matrix [[docs]](https://natario1.github.io/docs/scenes)
5161

62+
5263
&#10240; <!-- Hack to add whitespace -->
5364

5465
<p align="center">

build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ buildscript {
1414
val kotlinVersion = property("kotlinVersion") as String
1515
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
1616
classpath("com.android.tools.build:gradle:3.6.3")
17-
classpath("com.otaliastudios.tools:publisher:0.2.0")
17+
classpath("com.otaliastudios.tools:publisher:0.3.3-rc2")
1818
}
1919
}
2020

@@ -23,6 +23,7 @@ allprojects {
2323
google()
2424
mavenCentral()
2525
jcenter()
26+
maven("https://dl.bintray.com/natario/multiplatform")
2627
}
2728
}
2829

demo/build.gradle.kts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,8 @@ dependencies {
2727
implementation("com.google.android.exoplayer:exoplayer-core:2.10.4")
2828
implementation("com.google.android.exoplayer:exoplayer-ui:2.10.4")
2929
implementation(project(":library"))
30+
31+
// For testing, instead of the project dependency:
32+
// implementation("com.otaliastudios.opengl:egloo:0.5.1-rc1")
33+
// implementation("com.otaliastudios.opengl:egloo-android:0.5.1-rc1")
3034
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ class VideoActivity : AppCompatActivity(), GLSurfaceView.Renderer {
7878
val dataSourceFactory = DefaultDataSourceFactory(this,
7979
Util.getUserAgent(this, "Egloo"))
8080
val videoSource = ProgressiveMediaSource.Factory(dataSourceFactory)
81-
.createMediaSource(Uri.parse("https://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4"))
81+
// .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"))
8283
player.prepare(videoSource)
8384
player.playWhenReady = true
8485

docs/_about/changelog.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,33 @@ 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.5.1
13+
14+
Native targets are now published to JCenter and can be added as dependencies from Kotlin Multiplatform
15+
projects ([#22][22]). You can add the granular dependencies:
16+
17+
```kotlin
18+
implementation("com.otaliastudios.opengl:egloo-android:0.5.1") // android
19+
implementation("com.otaliastudios.opengl:egloo-androidnativex86:0.5.1") // android native
20+
implementation("com.otaliastudios.opengl:egloo-androidnativex64:0.5.1") // android native
21+
implementation("com.otaliastudios.opengl:egloo-androidnativearm32:0.5.1") // android native
22+
implementation("com.otaliastudios.opengl:egloo-androidnativearm64:0.5.1") // android native
23+
```
24+
25+
Or simply add the common dependency for your Kotlin Multiplatform common source set:
26+
27+
```kotlin
28+
// This will include the correct artifact into your targets
29+
implementation("com.otaliastudios.opengl:egloo-multiplatform:0.5.1")
30+
```
31+
32+
<https://github.com/natario1/Egloo/compare/v0.5.0...v0.5.1>
33+
1234
### v0.5.0
1335

1436
This release adds support for native targets. We provide an implementation for Android native libraries,
1537
but other targets like iOS can probably be added easily. These artifacts are not currently published
16-
but can be built using `./gradlew :library:publishLocal` . ([#20][20]).
38+
but can be built using `./gradlew :library:publishLocal` ([#20][20]).
1739

1840
Other changes:
1941

@@ -40,3 +62,4 @@ First versioned release.
4062
[14]: https://github.com/natario1/Egloo/pull/14
4163
[18]: https://github.com/natario1/Egloo/pull/18
4264
[20]: https://github.com/natario1/Egloo/pull/20
65+
[22]: https://github.com/natario1/Egloo/pull/22

docs/_about/install.md

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@ description: "Integrate in your project"
55
order: 1
66
---
77

8-
The library works on API 18+, which is the only requirement and should be met by many projects nowadays.
9-
10-
It is publicly hosted on [JCenter](https://bintray.com/natario/android/Egloo), where you
11-
can download the AAR package. To fetch with Gradle, make sure you add the JCenter repository in your root projects `build.gradle` file:
8+
Egloo is publicly hosted on [JCenter](https://bintray.com/natario/android/Egloo), where you
9+
can download the AAR package and other artifacts. To fetch with Gradle, make sure you add the
10+
JCenter repository in your root projects `build.gradle` file:
1211

1312
```groovy
1413
allprojects {
@@ -18,10 +17,26 @@ allprojects {
1817
}
1918
```
2019

21-
Then simply download the latest version:
20+
Then simply download the latest version. For regular Android projects users:
21+
22+
```kotlin
23+
implementation("com.otaliastudios.opengl:egloo-android:{{ site.github_version }}")
24+
```
25+
26+
For Kotlin Multiplatform projects:
27+
28+
```kotlin
29+
// Add a single dependency into your common Kotlin Multiplatform sourceset.
30+
// This will include the correct artifact for each target that you want to support.
31+
implementation("com.otaliastudios.opengl:egloo-multiplatform:{{ site.github_version }}")
32+
33+
// Or use granular dependencies:
34+
implementation("com.otaliastudios.opengl:egloo-android:{{ site.github_version }}") // Android AAR
35+
implementation("com.otaliastudios.opengl:egloo-androidnativex86:{{ site.github_version }}") // Android Native KLib
36+
implementation("com.otaliastudios.opengl:egloo-androidnativex64:{{ site.github_version }}") // Android Native KLib
37+
implementation("com.otaliastudios.opengl:egloo-androidnativearm32:{{ site.github_version }}") // Android Native KLib
38+
implementation("com.otaliastudios.opengl:egloo-androidnativearm64:{{ site.github_version }}") // Android Native KLib
2239

23-
```groovy
24-
implementation 'com.otaliastudios.opengl:egloo:{{ site.github_version }}'
2540
```
2641

27-
No other configuration steps are needed.
42+
> The Android version works on API 18+, which is the only requirement and should be met by many projects nowadays.

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.5.0
15+
github_version: 0.5.1
1616
github_branch: master
1717
baseurl: '/Egloo' # Keep as an empty string if served up at the root
1818
collections:

docs/home.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,15 @@ that uses object-oriented components - hence the name Egl**oo**. It can serve as
1010
complex drawing operations, but is mostly designed for helping in making common tasks simpler,
1111
even for people that do not have any OpenGL experience.
1212

13-
Approaching OpenGL from Android can be hard because of the deep differences in the OpenGL API design
13+
Approaching OpenGL from high-level languages can be hard because of the deep differences in the OpenGL API design
1414
with respect to a typical object-oriented context. Egloo tries to take some of these difficulties away
1515
by creating a **thin**, flexible layer of abstraction around EGL and GLES calls.
1616

17-
You can take a look at the demo app or see Egloo in action in more popular projects:
17+
You can take a look at the demo app or see Egloo in action in some popular Android projects:
1818

19-
- in a zoomable Surface in the [ZoomLayout](https://github.com/natario1/ZoomLayout) library
20-
- for transcoding videos in the [Transcoder](https://github.com/natario1/Transcoder) library
19+
- for camera preview and real-time filters: see [CameraView](https://github.com/natario1/CameraView)
20+
- in a zoomable Surface: see [ZoomLayout](https://github.com/natario1/ZoomLayout)
21+
- for transcoding videos: see [Transcoder](https://github.com/natario1/Transcoder)
2122

2223
<p align="center">
2324
<img src="static/banner.png" vspace="10" width="100%">
@@ -32,8 +33,7 @@ You can take a look at the demo app or see Egloo in action in more popular proje
3233
- Scenes to hold view and projection matrix [[docs]](docs/scenes)
3334

3435
> Starting from 0.5.0, Egloo can run on native targets. We provide an implementation for Android native libraries,
35-
but other targets like iOS can probably be added easily. These artifacts are not currently published
36-
but can be built using `./gradlew :library:publishLocal` .
36+
but other targets like iOS can probably be added easily. See [install info](about/install).
3737

3838
### Get started
3939

0 commit comments

Comments
 (0)