Skip to content

Commit

Permalink
Merge pull request #99 from dotintent/gmiszewski/newEnableBTMethod
Browse files Browse the repository at this point in the history
[Android] All changes for next release
  • Loading branch information
gmiszewski-intent authored Sep 22, 2023
2 parents 427b415 + 4154490 commit b911810
Show file tree
Hide file tree
Showing 50 changed files with 1,115 additions and 609 deletions.
12 changes: 5 additions & 7 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,19 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.android.tools.build:gradle:8.1.1'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.10'
}
}

allprojects {
repositories {
google()
jcenter()
mavenCentral()
maven { url "https://jitpack.io" }
}
}

Expand Down
17 changes: 11 additions & 6 deletions android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
## For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
#
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m
# Default value: -Xmx1024m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
#
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
#Sat Sep 02 08:26:44 CEST 2023
android.enableJetifier=true
android.useAndroidX=true
org.gradle.jvmargs=-Xmx2048M -Dkotlin.daemon.jvm.options\="-Xmx2048M"

// For now suppress error, but we want to use 34 in sample app
android.suppressUnsupportedCompileSdk=34
4 changes: 2 additions & 2 deletions android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Aug 27 15:53:45 CEST 2019
#Fri Sep 01 11:57:50 CEST 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
68 changes: 48 additions & 20 deletions android/library/build.gradle
Original file line number Diff line number Diff line change
@@ -1,34 +1,44 @@
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'kotlin-android'
apply plugin: 'maven-publish'

group='com.github.Polidea'
group='com.polidea.multiplatformbleadapter'
version='2.0'

buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
classpath "com.android.tools.build:gradle:8.0.2"
}
}

repositories {
google()
jcenter()
mavenCentral()
}

android {
compileSdkVersion 28
compileSdk 33
namespace = 'com.polidea.multiplatformbleadapter'
publishing {
singleVariant("release") {
withSourcesJar()
}
}

defaultConfig {
minSdkVersion 18
targetSdkVersion 28
versionCode 1
versionName "1.0"
minSdkVersion 23
targetSdkVersion 33
versionCode 2
versionName "2.0"
aarMetadata {
minCompileSdk = 30
}
}

buildTypes {
release {
minifyEnabled false
Expand All @@ -38,19 +48,37 @@ android {
matchingFallbacks = ['debug', 'release']
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "com.polidea.rxandroidble:rxandroidble:1.7.1"
testImplementation 'junit:junit:4.12'
api 'io.reactivex.rxjava2:rxjava:2.2.17'
api "com.polidea.rxandroidble2:rxandroidble:1.17.2"
}

task sourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.sourceFiles
}
tasks.withType(PublishToMavenRepository).configureEach { it.enabled = false }

publishing {
publications {
release(MavenPublication) {
groupId 'com.polidea.multiplatformbleadapter'
artifactId 'library'
version '2.0'


artifacts {
archives sourcesJar
pom {
name = "Multiplatform Ble Adapter"
}

afterEvaluate {
from components.release
}
}
}
}
20 changes: 16 additions & 4 deletions android/library/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.polidea.multiplatformbleadapter">
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
xmlns:tools="http://schemas.android.com/tools">

<uses-permission-sdk-23 android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission
android:name="android.permission.BLUETOOTH"
android:maxSdkVersion="30" />
<uses-permission
android:name="android.permission.BLUETOOTH_ADMIN"
android:maxSdkVersion="30" />
<uses-permission
android:name="android.permission.BLUETOOTH_SCAN"
android:usesPermissionFlags="neverForLocation"
tools:targetApi="s" />
<uses-permission
android:name="android.permission.BLUETOOTH_CONNECT"
tools:targetApi="s" />
</manifest>
Loading

0 comments on commit b911810

Please sign in to comment.