diff --git a/scripts/bintray-publish.gradle b/scripts/bintray-publish.gradle deleted file mode 100644 index 6707b915..00000000 --- a/scripts/bintray-publish.gradle +++ /dev/null @@ -1,77 +0,0 @@ -// Start https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle -group = publishedGroupId // Maven Group ID for the artifact -install { - repositories.mavenInstaller { - pom { - project { - packaging 'aar' - groupId publishedGroupId - artifactId artifact - - name libraryName - description libraryDescription - url siteUrl - - licenses { - license { - name 'GNU General Public License version 3' - url 'https://opensource.org/licenses/gpl-3.0.html' - } - } - - developers { - developer { - id 'fornwall' - name 'Fredrik Fornwall' - email 'fredrik@fornwall.net' - } - } - scm { - connection gitUrl - developerConnection gitUrl - url siteUrl - } - } - } - } -} -// End https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle - -// Start https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle -apply plugin: 'com.jfrog.bintray' - -version = libraryVersion - -task sourcesJar(type: Jar) { - classifier = 'sources' - from android.sourceSets.main.java.srcDirs -} - -artifacts { - archives sourcesJar -} - -bintray { - user = System.getenv('BINTRAY_USER') - key = System.getenv('BINTRAY_API_KEY') - - configurations = ['archives'] - pkg { - repo = 'maven' - name = bintrayName - userOrg = 'termux' - desc = libraryDescription - websiteUrl = siteUrl - vcsUrl = gitUrl - licenses = ['GPL-3.0'] - publish = true - publicDownloadNumbers = true - version { - desc = libraryDescription - gpg { - sign = false //Determines whether to GPG sign the files. The default is false - // passphrase = properties.getProperty("bintray.gpg.password") - } - } - } -} diff --git a/terminal-emulator/build.gradle b/terminal-emulator/build.gradle index 1e27cf64..44249258 100644 --- a/terminal-emulator/build.gradle +++ b/terminal-emulator/build.gradle @@ -1,20 +1,5 @@ -plugins { - id "com.jfrog.bintray" version "1.8.5" - id "com.github.dcendents.android-maven" version "2.1" -} - apply plugin: 'com.android.library' - -ext { - bintrayName = 'terminal-emulator' - publishedGroupId = 'com.termux' - libraryName = 'TerminalEmulator' - artifact = 'terminal-emulator' - libraryDescription = 'The terminal emulator used in Termux' - siteUrl = 'https://github.com/termux/termux-app' - gitUrl = 'https://github.com/termux/termux-app.git' - libraryVersion = '0.106' -} +apply plugin: 'maven-publish' android { compileSdkVersion project.properties.compileSdkVersion.toInteger() @@ -68,4 +53,26 @@ dependencies { testImplementation 'junit:junit:4.13.1' } -apply from: '../scripts/bintray-publish.gradle' + +publishing { + publications { + bar(MavenPublication) { + groupId 'com.termux' + artifactId 'terminal-emulator' + version '0.106' + 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") + } + } + } +} diff --git a/terminal-view/build.gradle b/terminal-view/build.gradle index 338563f7..1ab13697 100644 --- a/terminal-view/build.gradle +++ b/terminal-view/build.gradle @@ -1,20 +1,5 @@ -plugins { - id "com.jfrog.bintray" version "1.8.5" - id "com.github.dcendents.android-maven" version "2.1" -} - apply plugin: 'com.android.library' - -ext { - bintrayName = 'terminal-view' - publishedGroupId = 'com.termux' - libraryName = 'TerminalView' - artifact = 'terminal-view' - libraryDescription = 'The terminal view used in Termux' - siteUrl = 'https://github.com/termux/termux-app' - gitUrl = 'https://github.com/termux/termux-app.git' - libraryVersion = '0.106' -} +apply plugin: 'maven-publish' android { compileSdkVersion project.properties.compileSdkVersion.toInteger() @@ -47,4 +32,25 @@ dependencies { testImplementation 'junit:junit:4.13.1' } -apply from: '../scripts/bintray-publish.gradle' +publishing { + publications { + bar(MavenPublication) { + groupId 'com.termux' + artifactId 'terminal-view' + version '0.106' + 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") + } + } + } +}