diff --git a/ReactAndroid/build.gradle b/ReactAndroid/build.gradle index 142cbb70c8f0b8..84821820cd2ff6 100644 --- a/ReactAndroid/build.gradle +++ b/ReactAndroid/build.gradle @@ -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 @@ -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