Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions ReactAndroid/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,12 @@ task installArchives {
dependsOn("publishReleasePublicationToNpmRepository")
}

// Creating sources with comments
task androidSourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.srcDirs
}

android {
compileSdkVersion 31

Expand Down Expand Up @@ -414,6 +420,9 @@ afterEvaluate {
// Applies the component for the release build variant.
from components.release

// Add additional sourcesJar to artifacts
artifact(androidSourcesJar)

// You can then customize attributes of the publication as shown below.
artifactId = POM_ARTIFACT_ID
groupId = GROUP
Expand Down