Skip to content

Commit

Permalink
Update build.gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
furkanaskin authored Jan 2, 2023
1 parent 1afd80e commit c5aa864
Showing 1 changed file with 55 additions and 1 deletion.
56 changes: 55 additions & 1 deletion library/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'maven-publish'

group='com.erkutaras.statelayout'

Expand All @@ -11,7 +12,7 @@ android {
minSdkVersion 14
targetSdkVersion 29
versionCode 24
versionName "1.5.0"
versionName "1.0.0"

vectorDrawables.useSupportLibrary = true
}
Expand All @@ -25,11 +26,64 @@ android {

}

ext {
mGroupId = "com.ozanlimited"
mArtifactId = "statelayout"
mVersionCode = 1
mVersionName = "1.0.0"

mLibraryName = "StateLayout"
mLibraryDescription = ""
}

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


afterEvaluate {
publishing {
publications {
maven(MavenPublication) {
groupId mGroupId
artifactId mArtifactId
version mVersionName

from components.release

artifact androidSourcesJar

pom {
name = mLibraryName
description = mLibraryDescription
}
}
}

repositories {
maven {
url System.getenv("GITLAB_REPO_URL")
credentials(HttpHeaderCredentials) {
name = System.getenv("GITLAB_DEPLOY_KEY")
value = System.getenv("GITLAB_DEPLOY_TOKEN")
}
authentication {
header(HttpHeaderAuthentication)
}
}
}
}
}

publish.dependsOn assemble

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

repositories {
mavenCentral()
}

0 comments on commit c5aa864

Please sign in to comment.