diff --git a/app/build.gradle b/app/build.gradle index 7310d13..833eee4 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -76,5 +76,5 @@ dependencies { localImplementation project(path: ':library') - jitpackImplementation 'com.github.Q42:Q42Stats.Android:v0.0.3' + jitpackImplementation 'com.github.Q42:Q42Stats.Android:0.0.4' } \ No newline at end of file diff --git a/library/build.gradle b/library/build.gradle index 35d2526..9bff5b9 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -3,7 +3,7 @@ import java.text.SimpleDateFormat plugins { id 'com.android.library' id 'kotlin-android' - id 'maven' + id 'maven-publish' } group = 'com.github.Q42' @@ -28,7 +28,7 @@ android { buildTypes { release { - minifyEnabled false + minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' consumerProguardFiles 'proguard-rules.pro' debuggable false @@ -41,23 +41,9 @@ android { kotlinOptions { jvmTarget = '1.8' } - - task sourcesJar(type: Jar, dependsOn: classes) { - classifier = 'sources' - from sourceSets.main.allSource - } - - task javadocJar(type: Jar, dependsOn: javadoc) { - classifier = 'javadoc' - from javadoc.destinationDir - } - - artifacts { - archives sourcesJar - archives javadocJar - } } + dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" @@ -67,4 +53,25 @@ dependencies { testImplementation 'org.json:json:20201115' +} + +// Because the components are created only during the afterEvaluate phase, you must +// configure your publications using the afterEvaluate() lifecycle method. +afterEvaluate { + publishing { + publications { + // 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. + // JitPack will override these value for us, so leave them to the defaults. + // Default group is set in the root of this gradle file + //groupId = 'com.example.MyLibrary' + //artifactId = 'final' + //version = '1.0' + } + } + } } \ No newline at end of file