Skip to content

Commit

Permalink
Changes in Build Gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
gopikr936 committed Aug 20, 2023
1 parent 9094f62 commit f995a5f
Showing 1 changed file with 43 additions and 27 deletions.
70 changes: 43 additions & 27 deletions ConnectLibrary/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -86,36 +86,52 @@ dependencies {
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}

project.afterEvaluate {
//
//project.afterEvaluate {
// publishing {
// publications {
// library(MavenPublication) {
// setGroupId groupId
// setArtifactId artifactId
// version android.defaultConfig.versionName
//
// artifact bundleReleaseAar
// pom.withXml {
// def dependenciesNode = asNode().appendNode('dependencies')
//
// // Iterate over the implementation dependencies (we don't want the test ones),
// // adding a <dependency> node for each
// configurations.implementation.allDependencies.each {
// // Ensure dependencies such as fileTree are not included in the pom.
// if (it.name != 'unspecified') {
// def dependencyNode = dependenciesNode.appendNode('dependency')
// dependencyNode.appendNode('groupId', it.group)
// dependencyNode.appendNode('artifactId', it.name)
// dependencyNode.appendNode('version', it.version)
// }
// }
// }
// }
// }
// }
//}
//
//secrets {
// propertiesFileName = "secrets.properties"
//}

afterEvaluate {
publishing {
publications {
library(MavenPublication) {
setGroupId groupId
setArtifactId artifactId
version android.defaultConfig.versionName

artifact bundleReleaseAar
pom.withXml {
def dependenciesNode = asNode().appendNode('dependencies')

// Iterate over the implementation dependencies (we don't want the test ones),
// adding a <dependency> node for each
configurations.implementation.allDependencies.each {
// Ensure dependencies such as fileTree are not included in the pom.
if (it.name != 'unspecified') {
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', it.group)
dependencyNode.appendNode('artifactId', it.name)
dependencyNode.appendNode('version', it.version)
}
}
}
// Creates a Maven publication called "release".
release(MavenPublication) {
// Applies the component for the release build variant.
from components.release
// You can then customize attributes of the publication as shown below.
groupId = 'infinity-lib'
artifactId = 'in.eko.connectlib'
version = '1.0.0'
}
}
}
}

secrets {
propertiesFileName = "secrets.properties"
}

0 comments on commit f995a5f

Please sign in to comment.