Skip to content

Commit

Permalink
update gradle configurations.
Browse files Browse the repository at this point in the history
  • Loading branch information
sinyu890807 committed Oct 9, 2018
1 parent cf753b5 commit 10c4bf8
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 23 deletions.
6 changes: 0 additions & 6 deletions core/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'org.jetbrains.dokka-android'
apply plugin: 'maven-publish'

android {
compileSdkVersion 28
Expand All @@ -25,7 +20,6 @@ android {
dependencies {
api fileTree(dir: 'libs', include: ['*.jar'])
api 'com.android.support:appcompat-v7:28.0.0'
api "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}

if (hasProperty("BINTRAY_KEY")) {
Expand Down
18 changes: 15 additions & 3 deletions java/bintray.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,22 @@ publishing {
pom{
packaging 'aar'
}
// pom.withXml {
// def root = asNode()
// root.appendNode('description', PROJ_DESCRIPTION)
// root.children().last() + pomConfig
// }
//The publication doesn't know about our dependencies, so we have to manually add them to the pom
pom.withXml {
def root = asNode()
root.appendNode('description', PROJ_DESCRIPTION)
root.children().last() + pomConfig
def dependenciesNode = asNode().appendNode('dependencies')

//Iterate over the compile dependencies (we don't want the test ones), adding a <dependency> node for each
configurations.api.allDependencies.each {
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', it.group)
dependencyNode.appendNode('artifactId', it.name)
dependencyNode.appendNode('version', it.version)
}
}
}
}
Expand Down
7 changes: 0 additions & 7 deletions java/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'org.jetbrains.dokka-android'
apply plugin: 'maven-publish'

android {
compileSdkVersion 28
Expand All @@ -23,8 +18,6 @@ android {
}

dependencies {
api fileTree(include: ['*.jar'], dir: 'libs')
api "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
api project(':core')
}

Expand Down
18 changes: 15 additions & 3 deletions kotlin/bintray.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,22 @@ publishing {
pom{
packaging 'aar'
}
// pom.withXml {
// def root = asNode()
// root.appendNode('description', PROJ_DESCRIPTION)
// root.children().last() + pomConfig
// }
//The publication doesn't know about our dependencies, so we have to manually add them to the pom
pom.withXml {
def root = asNode()
root.appendNode('description', PROJ_DESCRIPTION)
root.children().last() + pomConfig
def dependenciesNode = asNode().appendNode('dependencies')

//Iterate over the compile dependencies (we don't want the test ones), adding a <dependency> node for each
configurations.api.allDependencies.each {
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', it.group)
dependencyNode.appendNode('artifactId', it.name)
dependencyNode.appendNode('version', it.version)
}
}
}
}
Expand Down
5 changes: 1 addition & 4 deletions kotlin/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'org.jetbrains.dokka-android'
apply plugin: 'maven-publish'

android {
compileSdkVersion 28
Expand All @@ -23,8 +21,7 @@ android {
}

dependencies {
api fileTree(dir: 'libs', include: ['*.jar'])
api "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
api project(':core')
}

Expand Down
1 change: 1 addition & 0 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':kotlin')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
Expand Down

0 comments on commit 10c4bf8

Please sign in to comment.