diff --git a/build.gradle b/build.gradle index c9adf78..074159c 100644 --- a/build.gradle +++ b/build.gradle @@ -2,4 +2,5 @@ plugins { id 'com.android.application' version '8.3.2' apply false id 'com.android.library' version '8.3.2' apply false + id 'maven-publish' } diff --git a/library/build.gradle b/library/build.gradle index c3f701f..77678e7 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -1,5 +1,6 @@ plugins { id 'com.android.library' + id 'maven-publish' } android { @@ -20,10 +21,18 @@ android { proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } + compileOptions { sourceCompatibility JavaVersion.VERSION_17 targetCompatibility JavaVersion.VERSION_17 } + + publishing { + singleVariant("release") { + withSourcesJar() + withJavadocJar() + } + } } dependencies { @@ -34,3 +43,16 @@ dependencies { androidTestImplementation 'androidx.test.ext:junit:1.1.5' androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' } + +afterEvaluate { + publishing { + publications { + release(MavenPublication) { + from components.release + groupId = 'dev.gerlot.securewebview' + artifactId = 'securewebview' + version = '1.0.0-alpha01' + } + } + } +}