-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support dual publishing of standard and prefixed webrtc build (#18)
* Support dual publishing of standard and prefixed webrtc build * Prefix so files to avoid collison
- Loading branch information
Showing
26 changed files
with
372 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
build/ | ||
.gradle/ | ||
.DS_Store | ||
*.asc | ||
*.asc | ||
local.properties |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
plugins { | ||
id 'signing' | ||
id 'com.android.library' | ||
id 'com.kezong.fat-aar' | ||
id 'maven-publish' | ||
} | ||
group = 'com.github.davidliu' | ||
|
||
android { | ||
namespace 'com.github.davidliu.lkshadowwebrtc' | ||
compileSdk 33 | ||
|
||
defaultConfig { | ||
minSdk 21 | ||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
} | ||
} | ||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_1_7 | ||
targetCompatibility JavaVersion.VERSION_1_7 | ||
} | ||
afterEvaluate { | ||
generateReleaseBuildConfig.enabled = false | ||
generateDebugBuildConfig.enabled = false | ||
generateReleaseResValues.enabled = false | ||
generateDebugResValues.enabled = false | ||
} | ||
} | ||
|
||
dependencies { | ||
compileOnly project(path: ':android-prefixed:shadow', configuration: 'shadow') | ||
embed project(path: ':android-prefixed:shadow', configuration: 'shadow') | ||
} | ||
|
||
def POM_ARTIFACT_ID = "android-prefixed" | ||
|
||
def getReleaseRepositoryUrl() { | ||
return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL | ||
: "https://oss.sonatype.org/service/local/staging/deploy/maven2/" | ||
} | ||
|
||
def getRepositoryUsername() { | ||
return hasProperty('nexusUsername') ? nexusUsername : "" | ||
} | ||
|
||
def getRepositoryPassword() { | ||
return hasProperty('nexusPassword') ? nexusPassword : "" | ||
} | ||
|
||
def configurePom(pom) { | ||
pom.name = POM_NAME | ||
pom.packaging = POM_PACKAGING | ||
pom.description = POM_DESCRIPTION | ||
pom.url = POM_URL | ||
|
||
pom.scm { | ||
url = POM_SCM_URL | ||
connection = POM_SCM_CONNECTION | ||
developerConnection = POM_SCM_DEV_CONNECTION | ||
} | ||
|
||
pom.licenses { | ||
license { | ||
name = POM_LICENCE_NAME | ||
url = POM_LICENCE_URL | ||
distribution = POM_LICENCE_DIST | ||
} | ||
} | ||
|
||
pom.developers { | ||
developer { | ||
id = POM_DEVELOPER_ID | ||
name = POM_DEVELOPER_NAME | ||
} | ||
} | ||
} | ||
|
||
afterEvaluate { | ||
|
||
publishing { | ||
repositories { | ||
maven { | ||
url getReleaseRepositoryUrl() | ||
credentials(PasswordCredentials) { | ||
username = getRepositoryUsername() | ||
password = getRepositoryPassword() | ||
} | ||
} | ||
} | ||
publications { | ||
androidPrefixed(MavenPublication) { | ||
// Applies the component for the release build variant. | ||
from components.release | ||
|
||
groupId = GROUP | ||
artifactId = POM_ARTIFACT_ID | ||
version = VERSION_NAME | ||
artifact("deploy/sources.jar") { | ||
classifier 'sources' | ||
} | ||
artifact("deploy/javadoc.jar") { | ||
classifier 'javadoc' | ||
} | ||
configurePom(pom) | ||
} | ||
} | ||
|
||
signing { | ||
publishing.publications.all { publication -> | ||
sign publication | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Javadoc and sources are not available, but are required for deployment on Sonatype. These jars are used to bypass those checks. |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
plugins { | ||
id 'java-library' | ||
id 'com.github.johnrengelman.shadow' version '7.1.2' | ||
} | ||
|
||
java { | ||
sourceCompatibility = JavaVersion.VERSION_1_7 | ||
targetCompatibility = JavaVersion.VERSION_1_7 | ||
} | ||
|
||
dependencies { | ||
api files("libs/classes.jar") | ||
} | ||
|
||
shadowJar { | ||
|
||
} | ||
import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation | ||
|
||
task relocateShadowJar(type: ConfigureShadowRelocation) { | ||
target = tasks.shadowJar | ||
prefix = "livekit" // Default value is "shadow" | ||
} | ||
tasks.shadowJar.dependsOn tasks.relocateShadowJar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
|
||
apply plugin: "maven-publish" | ||
apply plugin: 'signing' | ||
|
||
def POM_ARTIFACT_ID = "android" | ||
def AAR_FILE = "libwebrtc.aar" | ||
|
||
def getReleaseRepositoryUrl() { | ||
return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL | ||
: "https://oss.sonatype.org/service/local/staging/deploy/maven2/" | ||
} | ||
|
||
def getRepositoryUsername() { | ||
return hasProperty('nexusUsername') ? nexusUsername : "" | ||
} | ||
|
||
def getRepositoryPassword() { | ||
return hasProperty('nexusPassword') ? nexusPassword : "" | ||
} | ||
|
||
def configurePom(pom) { | ||
pom.name = POM_NAME | ||
pom.packaging = POM_PACKAGING | ||
pom.description = POM_DESCRIPTION | ||
pom.url = POM_URL | ||
|
||
pom.scm { | ||
url = POM_SCM_URL | ||
connection = POM_SCM_CONNECTION | ||
developerConnection = POM_SCM_DEV_CONNECTION | ||
} | ||
|
||
pom.licenses { | ||
license { | ||
name = POM_LICENCE_NAME | ||
url = POM_LICENCE_URL | ||
distribution = POM_LICENCE_DIST | ||
} | ||
} | ||
|
||
pom.developers { | ||
developer { | ||
id = POM_DEVELOPER_ID | ||
name = POM_DEVELOPER_NAME | ||
} | ||
} | ||
} | ||
|
||
afterEvaluate { | ||
|
||
publishing { | ||
repositories { | ||
maven { | ||
url getReleaseRepositoryUrl() | ||
credentials(PasswordCredentials) { | ||
username = getRepositoryUsername() | ||
password = getRepositoryPassword() | ||
} | ||
} | ||
} | ||
publications { | ||
android(MavenPublication) { | ||
groupId = GROUP | ||
artifactId = POM_ARTIFACT_ID | ||
version = VERSION_NAME | ||
artifact(AAR_FILE) | ||
artifact("deploy/sources.jar") { | ||
classifier 'sources' | ||
} | ||
artifact("deploy/javadoc.jar") { | ||
classifier 'javadoc' | ||
} | ||
configurePom(pom) | ||
} | ||
} | ||
|
||
signing { | ||
publishing.publications.all { publication -> | ||
sign publication | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Javadoc and sources are not available, but are required for deployment on Sonatype. These jars are used to bypass those checks. |
Binary file not shown.
Binary file not shown.
Oops, something went wrong.