apply plugin: 'com.android.library' apply plugin: 'org.jetbrains.kotlin.android' apply plugin: 'maven-publish' android { namespace 'org.matrix.rustcomponents.sdk.crypto' compileSdk 33 defaultConfig { minSdk 21 targetSdk 33 versionName rootProject.ext.module_version testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles "consumer-rules.pro" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } kotlinOptions { jvmTarget = '1.8' } } dependencies { implementation 'net.java.dev.jna:jna:5.13.0@aar' } def groupIdString = "org.futo.rustcomponents" def artifactIdString = "crypto-android" afterEvaluate { Properties properties = new Properties() if (rootProject.file("local.properties").exists()) { properties.load(rootProject.file("local.properties").newDataInputStream()) } publishing { publications { release(MavenPublication) { from components.release groupId groupIdString artifactId artifactIdString version rootProject.ext.module_version } } repositories { maven { url "https://gitlab.futo.org/api/v4/projects/$rootProject.ext.module_gitlab_projectId/packages/maven" name "GitLab" credentials(HttpHeaderCredentials) { name = "Private-Token" value = properties.getProperty("PUBLISH_TOKEN") } authentication { header(HttpHeaderAuthentication) } } } } }