Skip to content

Commit

Permalink
making stdlib common for all modules
Browse files Browse the repository at this point in the history
  • Loading branch information
ansh sachdeva committed Sep 5, 2021
1 parent e6a8e21 commit 3072949
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.5.20'
repositories {
google()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:7.0.0"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.20"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
8 changes: 7 additions & 1 deletion librariesCommonDataAndroid.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,10 @@ android {
jvmTarget = '1.8'
}
}
apply from: "${project.rootDir}/librariesPublishData.gradle"
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}

apply from: "${project.rootDir}/librariesPublishData.gradle"

//todo : retrofit arch, glide, gson extensions.
20 changes: 10 additions & 10 deletions librariesPublishData.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ afterEvaluate {
}

// Gradle task to generate sources after building a release aar
//task sourcesJar(type: Jar) {
// archiveClassifier = 'sources'
// from android.sourceSets.main.java.srcDirs
//}
//
//tasks.whenTaskAdded { task ->
// if (task.name == 'assembleRelease') {
// task.dependsOn 'sourcesJar'
// }
//}
task sourcesJar(type: Jar) {
archiveClassifier = 'sources'
from android.sourceSets.main.java.srcDirs
}

tasks.whenTaskAdded { task ->
if (task.name == 'assembleRelease') {
task.dependsOn 'sourcesJar'
}
}

0 comments on commit 3072949

Please sign in to comment.