diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml index 0d156937bbbd8ca9d099f9cda685e7b13c6a64c2..681f41ae2aee4749eb4ddda94f8c6a76c825c825 100644 --- a/.idea/codeStyles/Project.xml +++ b/.idea/codeStyles/Project.xml @@ -1,23 +1,5 @@ <component name="ProjectCodeStyleConfiguration"> <code_scheme name="Project" version="173"> - <JetCodeStyleSettings> - <option name="PACKAGES_TO_USE_STAR_IMPORTS"> - <value> - <package name="java.util" alias="false" withSubpackages="false" /> - <package name="kotlinx.android.synthetic" alias="false" withSubpackages="true" /> - <package name="io.ktor" alias="false" withSubpackages="true" /> - </value> - </option> - <option name="PACKAGES_IMPORT_LAYOUT"> - <value> - <package name="" alias="false" withSubpackages="true" /> - <package name="java" alias="false" withSubpackages="true" /> - <package name="javax" alias="false" withSubpackages="true" /> - <package name="kotlin" alias="false" withSubpackages="true" /> - <package name="" alias="true" withSubpackages="true" /> - </value> - </option> - </JetCodeStyleSettings> <codeStyleSettings language="XML"> <indentOptions> <option name="CONTINUATION_INDENT_SIZE" value="4" /> diff --git a/.idea/compiler.xml b/.idea/compiler.xml index a0af1d1ac218e7769c104a946a139f9a8984d40d..fb7f4a8a465d42b4a0390d464b83b99e8465bba7 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <project version="4"> <component name="CompilerConfiguration"> - <bytecodeTargetLevel target="12" /> + <bytecodeTargetLevel target="11" /> </component> </project> \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index e394c073be32b5ba04c98163db6c950db7934ea9..360e6d41e364d4aebf23e7f2d3e9cef58a2eb12c 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <project version="4"> <component name="ExternalStorageConfigurationManager" enabled="true" /> - <component name="ProjectRootManager" version="2" languageLevel="JDK_12" project-jdk-name="1.8" project-jdk-type="JavaSDK"> + <component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="1.8" project-jdk-type="JavaSDK"> <output url="file://$PROJECT_DIR$/build/classes" /> </component> <component name="ProjectType"> diff --git a/build.gradle b/build.gradle index 7d9c37b75dec75d29b804cdf1d1505fcbe1f6b91..3c9eec6cfe9dac4910c8cc1493852f0d0b2cf43d 100644 --- a/build.gradle +++ b/build.gradle @@ -3,6 +3,7 @@ buildscript { apply from: 'dependencies.gradle' apply from: 'dependencies_groups.gradle' + apply from: 'gradle-publish.gradle' repositories { google() @@ -14,7 +15,6 @@ buildscript { dependencies { classpath libs.gradle.gradlePlugin classpath libs.gradle.kotlinPlugin - classpath 'com.vanniktech:gradle-maven-publish-plugin:0.18.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } @@ -55,14 +55,6 @@ allprojects { // Ignore on the SDK for the moment kotlinOptions.allWarningsAsErrors = false } - - plugins.withId("com.vanniktech.maven.publish") { - // Publish on s01.oss.sonatype.org - //https://github.com/vanniktech/gradle-maven-publish-plugin#where-to-upload-to - mavenPublish { - sonatypeHost = "S01" - } - } } task clean(type: Delete) { diff --git a/dependencies.gradle b/dependencies.gradle index 660457c3edb92c8f5b92691a23b5a0abf0fc0ac8..87b8e3c12ffabfac2fa80507b8587ef76d1cb181 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -15,7 +15,7 @@ def dagger = "2.40.5" def retrofit = "2.9.0" def arrow = "0.8.2" def markwon = "4.6.2" -def moshi = "1.13.0" +def moshi = "1.12.0" def lifecycle = "2.4.0" def flowBinding = "1.2.0" def epoxy = "4.6.2" diff --git a/gradle-publish.gradle b/gradle-publish.gradle new file mode 100644 index 0000000000000000000000000000000000000000..beb70ffe15675a9a7efecd5cd29f3bc41a9c9956 --- /dev/null +++ b/gradle-publish.gradle @@ -0,0 +1,40 @@ +apply plugin: 'maven-publish' + +def artifactId = "matrix-sdk-android" +def artifactFilePath = "$buildDir/outputs/aar/${artifactId}-release.aar" +def publicationName = "release" + + +publishing { + publications { + "${publicationName}"(MavenPublication) { + groupId "org.matrix.android" + artifactId "${artifactId}" + version "1.4.4" + artifact "${artifactFilePath}" + + // To include project dependencies + pom.withXml { + def dependencies = asNode().appendNode('dependencies') + configurations.getByName("${publicationName}CompileClasspath").getResolvedConfiguration().getFirstLevelModuleDependencies().each { + def dependency = dependencies.appendNode('dependency') + dependency.appendNode('groupId', it.moduleGroup) + dependency.appendNode('artifactId', it.moduleName) + dependency.appendNode('version', it.moduleVersion) + } + } + } + } + repositories { + maven { + url "https://gitlab.com/api/v4/projects/16/packages/maven" + credentials(HttpHeaderCredentials) { + name = "Private-Token" + value = "e3yxa-_Duy7xLabSa7_z" + } + authentication { + header(HttpHeaderAuthentication) + } + } + } +} \ No newline at end of file diff --git a/matrix-sdk-android/build.gradle b/matrix-sdk-android/build.gradle index 6605acd29384c4104fd1e77cddbff46d6aafa9c6..3b10ff45995835ea131bf1cf334e97b2b239f230 100644 --- a/matrix-sdk-android/build.gradle +++ b/matrix-sdk-android/build.gradle @@ -3,8 +3,6 @@ apply plugin: 'kotlin-android' apply plugin: 'kotlin-kapt' apply plugin: 'kotlin-parcelize' apply plugin: 'realm-android' -// WARNING: always restore this line after importing code from Element Android (1/2) -apply plugin: "com.vanniktech.maven.publish" buildscript { repositories {