Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmercerind committed Oct 14, 2024
1 parent 293d1a6 commit ca0d9d2
Show file tree
Hide file tree
Showing 56 changed files with 1,459 additions and 1,197 deletions.
41 changes: 31 additions & 10 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
name: Build libmpv-android

on:
on:
push:
branches:
- main
pull_request:

permissions:
contents: write

jobs:
build:
name: Build
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -20,21 +23,39 @@ jobs:
java-version: 17
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Setup Flutter SDK
uses: subosito/flutter-action@v1
with:
channel: "stable"
- name: Symlink SDK
working-directory: ./buildscripts
run: |
mkdir sdk
ln -s ${ANDROID_HOME} ./sdk/android-sdk-linux
- name: Download dependencies
- name: Bundle (default)
working-directory: ./buildscripts
run: ./download.sh
- name: Apply patches
run: |
sudo chmod +x bundle_default.sh
./bundle_default.sh
- name: Bundle (full)
working-directory: ./buildscripts
run: ./patch.sh
- name: Build
run: |
sudo chmod +x bundle_full.sh
./bundle_full.sh
- name: Bundle (encoders-gpl)
working-directory: ./buildscripts
run: ./build.sh
run: |
sudo chmod +x bundle_encoders-gpl.sh
./bundle_encoders-gpl.sh
- uses: actions/upload-artifact@v4
with:
name: libmpv-release.aar
path: ./libmpv/build/outputs/aar/libmpv-release.aar
name: artifact
path: ./buildscripts/*.jar
- uses: softprops/action-gh-release@v1
if: github.ref == 'refs/heads/main'
with:
draft: true
prerelease: false
tag_name: "vnext"
files: |
buildscripts/*.jar
52 changes: 0 additions & 52 deletions .github/workflows/publish.yaml

This file was deleted.

19 changes: 19 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
For the "default" and "full" flavors, the following license applies:

Copyright (c) 2016 Ilya Zhuravlev
Copyright (c) 2016 sfan5 <[email protected]>

Expand All @@ -6,3 +8,20 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

For the "encoders-gpl" flavor, the following license applies:

Copyright (C) 2023 Callum Moffat

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
7 changes: 0 additions & 7 deletions README.md

This file was deleted.

44 changes: 6 additions & 38 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@Suppress("DSL_SCOPE_VIOLATION") // False positive
plugins {
alias(libs.plugins.android.library) apply false
alias(libs.plugins.publish.plugin) apply true
Expand All @@ -10,44 +11,11 @@ allprojects {
}
}

// Create variables with empty default values
ext["signing.keyId"] = null
ext["signing.password"] = null
ext["signing.key"] = null
ext["ossrhUsername"] = null
ext["ossrhPassword"] = null
ext["sonatypeStagingProfileId"] = null

val secretPropsFile: File = project.rootProject.file("local.properties")
if (secretPropsFile.exists()) {
// Read local.properties file first if it exists
secretPropsFile.reader().use {
java.util.Properties().apply {
load(it)
}
}.onEach { (name, value) ->
ext[name.toString()] = value
}
} else {
// Use system environment variables
ext["ossrhUsername"] = System.getenv("OSSRH_USERNAME")
ext["ossrhPassword"] = System.getenv("OSSRH_PASSWORD")
ext["sonatypeStagingProfileId"] = System.getenv("SONATYPE_STAGING_PROFILE_ID")
ext["signing.keyId"] = System.getenv("SIGNING_KEY_ID")
ext["signing.password"] = System.getenv("SIGNING_PASSWORD")
ext["signing.key"] = System.getenv("SIGNING_KEY")
tasks.wrapper {
gradleVersion = "7.6"
distributionType = Wrapper.DistributionType.ALL
}

fun getExtraString(name: String) = ext[name]?.toString()

nexusPublishing {
this.repositories {
sonatype {
stagingProfileId = getExtraString("sonatypeStagingProfileId")
username = getExtraString("ossrhUsername")
password = getExtraString("ossrhPassword")
nexusUrl = uri("https://s01.oss.sonatype.org/service/local/")
snapshotRepositoryUrl = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
}
}
apply {
from("$rootDir/scripts/publish-root.gradle")
}
125 changes: 0 additions & 125 deletions buildscripts/README.md

This file was deleted.

Loading

0 comments on commit ca0d9d2

Please sign in to comment.