Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix AndroidThemis publishing #669

Merged
merged 4 commits into from
Jul 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Enable "configuration on demand" [1] to allow building Themis for
# Desktop Java without having Android SDK installed.
# We'd like to enable "configuration on demand" [1] to allow building Themis
# for Desktop Java without having Android SDK installed, but for some reason
# it breaks Bintray publishing with a weird error [2]. Keep it disabled.
#
# [1]: https://docs.gradle.org/current/userguide/multi_project_builds.html#sec:configuration_on_demand
org.gradle.configureondemand=true
# [2]: https://stackoverflow.com/questions/42552511/cannot-change-dependencies-of-configuration-compile-after-it-has-been-resolve
org.gradle.configureondemand=false

# Versions of AndroidThemis and JavaThemis packages.
androidThemisVersion=0.13.0
Expand Down
5 changes: 2 additions & 3 deletions src/wrappers/themis/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ buildscript {

// Two necessary plugins for uploading .aar to bintray
// from: https://android.jlelse.eu/how-to-distribute-android-library-in-a-convenient-way-d43fb68304a7
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.1'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'

// Kotlin plugin for Android
Expand Down Expand Up @@ -102,7 +102,7 @@ apply plugin: 'maven-publish'
publishing {
publications {
Production(MavenPublication) {
artifact("$buildDir/outputs/aar/projects-release.aar")
artifact("build/outputs/aar/android.aar")
groupId 'com.cossacklabs.com'
artifactId 'themis'
version androidThemisVersion
Expand All @@ -114,7 +114,6 @@ bintray {
// Get Bintray credential from environment variable
user = System.getenv('BINTRAY_USER') // Get bintray User
key = System.getenv('BINTRAY_KEY') // Get bintray API Key from https://bintray.com/profile/edit -> APIKey
configurations = ['archives']
pkg {
repo = 'maven'
name = 'themis'
Expand Down
18 changes: 9 additions & 9 deletions src/wrappers/themis/java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,6 @@ buildscript {
}
}

sourceSets {
main {
java.srcDirs = ['.']
}
test {
java.srcDirs = ['../../../../tests/themis/wrappers/android']
}
}

dependencies {
// Nullable annotations, etc.
// Use a compatibility version to support Java 6.
Expand All @@ -29,6 +20,15 @@ dependencies {
testImplementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}

sourceSets {
main {
java.srcDirs = ['.']
}
test {
java.srcDirs = ['../../../../tests/themis/wrappers/android']
}
}

test {
useJUnit()

Expand Down