Skip to content

Commit

Permalink
use withSourcesJar
Browse files Browse the repository at this point in the history
  • Loading branch information
cmathew committed Oct 24, 2024
1 parent 5129cf2 commit ed6a0c9
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 19 deletions.
2 changes: 1 addition & 1 deletion buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repositories {
}

dependencies {
implementation 'com.android.tools.build:gradle:8.1.2'
implementation 'com.android.tools.build:gradle:8.1.4'
implementation 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.22'
}

Expand Down
18 changes: 0 additions & 18 deletions gradle/gradle-mvn-push.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -81,28 +81,10 @@ afterEvaluate { project ->
}
}

if (project.getPlugins().hasPlugin('com.android.application') ||
project.getPlugins().hasPlugin('com.android.library')) {

task androidSourcesJar(type: Jar) {
archiveClassifier = 'sources'
from android.sourceSets.main.java.source
}
}

artifacts {
if (project.getPlugins().hasPlugin('com.android.application') ||
project.getPlugins().hasPlugin('com.android.library')) {
archives androidSourcesJar
}
}

publishing.publications.all { publication ->
publication.groupId = GROUP
publication.version = VERSION_NAME

publication.artifact androidSourcesJar

configurePom(publication.pom)
}

Expand Down
7 changes: 7 additions & 0 deletions magellan-library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,14 @@ android {
minifyEnabled false
}
}

namespace 'com.wealthfront.magellan'

publishing {
singleVariant("release") {
withSourcesJar()
}
}
}

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
Expand Down
13 changes: 13 additions & 0 deletions magellan-rx2/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,25 @@ android {
setTargetCompatibility(JavaVersion.VERSION_17)
}

publishing {
singleVariant("release") {
withSourcesJar()
}
}

buildTypes {
release {
minifyEnabled false
}
}

namespace 'com.wealthfront.magellan.rx2'

publishing {
singleVariant("release") {
withSourcesJar()
}
}
}

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
Expand Down
13 changes: 13 additions & 0 deletions magellan-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,20 @@ android {
minifyEnabled false
}
}

publishing {
singleVariant("release") {
withSourcesJar()
}
}

namespace 'com.wealthfront.magellan.test'

publishing {
singleVariant("release") {
withSourcesJar()
}
}
}

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
Expand Down

0 comments on commit ed6a0c9

Please sign in to comment.