diff --git a/build/android/escargot/build.gradle b/build/android/escargot/build.gradle index 37be2b7a5..bfdb8cb63 100644 --- a/build/android/escargot/build.gradle +++ b/build/android/escargot/build.gradle @@ -1,10 +1,11 @@ plugins { id 'com.android.library' id 'jacoco' + id 'maven-publish' } ext { - force64Option = System.getProperty("ESCARGOT_BUILD_64BIT_FORCE_LARGE", "OFF") + force64Option = System.getProperty("ESCARGOT_BUILD_64BIT_FORCE_LARGE", "ON") } android { @@ -87,6 +88,33 @@ android { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } + + publishing { + singleVariant("release") { + // if you don't want sources/javadoc, remove these lines + withSourcesJar() + withJavadocJar() + } + } +} + +publishing { + publications { + release(MavenPublication) { + afterEvaluate { + from components.release + } + artifactId "escargot-android" + groupId "com.samsung.lwe.escargot" + version "X.X.X.20XXXXXX.X.XXXXXXXX" + } + } + + repositories { + maven { + url "/XXXXXX/android/releases/" + } + } } def dirForNativeNoNDK = project.layout.buildDirectory.get().dir("native_nondk") diff --git a/build/android/publish/android-example b/build/android/publish/android-example new file mode 100644 index 000000000..258f9257a --- /dev/null +++ b/build/android/publish/android-example @@ -0,0 +1 @@ +./gradlew publish diff --git a/build/android/publish/mac-example b/build/android/publish/mac-example new file mode 100644 index 000000000..e9c4db404 --- /dev/null +++ b/build/android/publish/mac-example @@ -0,0 +1,2 @@ +./gradlew bundleHostJar +MAVEN_OPTS="-Dmaven.repo.local=${MAVEN_LOCAL_PATH}/mac/releases/" mvn install:install-file -Dfile=${HOME}/escargot/build/libs/escargot.jar -DgroupId=com.samsung.lwe.escargot -DartifactId=escargot-mac -Dversion==X.X.X.20XXXXXX.X.XXXXXXX -Dpackaging=jar diff --git a/build/android/publish/ubuntu-example b/build/android/publish/ubuntu-example new file mode 100644 index 000000000..a5f6cf148 --- /dev/null +++ b/build/android/publish/ubuntu-example @@ -0,0 +1,2 @@ +./gradlew bundleHostJar +MAVEN_OPTS="-Dmaven.repo.local=${MAVEN_LOCAL_PATH}/ubuntu/releases/" mvn install:install-file -Dfile=${PWD}/escargot/build/libs/escargot.jar -DgroupId=com.samsung.lwe.escargot -DartifactId=escargot-ubuntu -Dversion=X.X.X.20XXXXXX.X.XXXXXXX -Dpackaging=jar