diff --git a/.github/workflows/publish_libraries.yml b/.github/workflows/publish_libraries.yml deleted file mode 100644 index 077539de..00000000 --- a/.github/workflows/publish_libraries.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Publish library packages - -on: - push: - branches: - - master - paths: - - 'terminal-emulator/build.gradle' - - 'terminal-view/build.gradle' - - 'termux-shared/build.gradle' - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Clone repository - uses: actions/checkout@v2 - - name: Perform release build - run: | - ./gradlew assembleRelease - - name: Publish libraries on Github Packages - env: - GH_USERNAME: xeffyr - GH_TOKEN: ${{ secrets.GH_TOKEN }} - run: | - ./gradlew publish diff --git a/build.gradle b/build.gradle index 01d0fe73..2f618dec 100644 --- a/build.gradle +++ b/build.gradle @@ -12,6 +12,7 @@ allprojects { repositories { google() mavenCentral() + maven { url "https://jitpack.io" } } } diff --git a/terminal-emulator/build.gradle b/terminal-emulator/build.gradle index bffcd681..3642ba49 100644 --- a/terminal-emulator/build.gradle +++ b/terminal-emulator/build.gradle @@ -58,25 +58,16 @@ task sourceJar(type: Jar) { classifier "sources" } -publishing { - publications { - bar(MavenPublication) { - groupId 'com.termux' - artifactId 'terminal-emulator' - version "0.114" - artifact(sourceJar) - artifact("$buildDir/outputs/aar/terminal-emulator-release.aar") - } - } - - repositories { - maven { - name = "GitHubPackages" - url = uri("https://maven.pkg.github.com/termux/termux-app") - - credentials { - username = System.getenv("GH_USERNAME") - password = System.getenv("GH_TOKEN") +afterEvaluate { + publishing { + publications { + // Creates a Maven publication called "release". + release(MavenPublication) { + from components.release + groupId = 'com.github.termux' + artifactId = 'terminal-emulator' + version = '0.114' + artifact(sourceJar) } } } diff --git a/terminal-view/build.gradle b/terminal-view/build.gradle index 0957b125..d3fb6cfd 100644 --- a/terminal-view/build.gradle +++ b/terminal-view/build.gradle @@ -37,25 +37,16 @@ task sourceJar(type: Jar) { classifier "sources" } -publishing { - publications { - bar(MavenPublication) { - groupId 'com.termux' - artifactId 'terminal-view' - version "0.114" - artifact(sourceJar) - artifact("$buildDir/outputs/aar/terminal-view-release.aar") - } - } - - repositories { - maven { - name = "GitHubPackages" - url = uri("https://maven.pkg.github.com/termux/termux-app") - - credentials { - username = System.getenv("GH_USERNAME") - password = System.getenv("GH_TOKEN") +afterEvaluate { + publishing { + publications { + // Creates a Maven publication called "release". + release(MavenPublication) { + from components.release + groupId = 'com.github.termux' + artifactId = 'terminal-view' + version = '0.114' + artifact(sourceJar) } } } diff --git a/termux-shared/build.gradle b/termux-shared/build.gradle index 3364cdc7..a6a39d3e 100644 --- a/termux-shared/build.gradle +++ b/termux-shared/build.gradle @@ -52,25 +52,16 @@ task sourceJar(type: Jar) { classifier "sources" } -publishing { - publications { - bar(MavenPublication) { - groupId 'com.termux' - artifactId 'termux-shared' - version "0.114" - artifact(sourceJar) - artifact("$buildDir/outputs/aar/termux-shared-release.aar") - } - } - - repositories { - maven { - name = "GitHubPackages" - url = uri("https://maven.pkg.github.com/termux/termux-app") - - credentials { - username = System.getenv("GH_USERNAME") - password = System.getenv("GH_TOKEN") +afterEvaluate { + publishing { + publications { + // Creates a Maven publication called "release". + release(MavenPublication) { + from components.release + groupId = 'com.github.termux' + artifactId = 'termux-shared' + version = '0.114' + artifact(sourceJar) } } }