Skip to content

Commit

Permalink
Revert "Migrate android"
Browse files Browse the repository at this point in the history
This reverts commit 282c3cf.
  • Loading branch information
lukaknezic committed May 31, 2022
1 parent f118923 commit d520e23
Show file tree
Hide file tree
Showing 63 changed files with 1,287 additions and 524 deletions.
61 changes: 37 additions & 24 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,58 +1,71 @@
group 'com.infinum.flutter_locker'
group 'com.example.flutter_locker'
version '1.0-SNAPSHOT'

buildscript {
ext.kotlin_version = '1.6.21'
ext.kotlin_version = '1.3.50'
repositories {
google()
mavenCentral()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:4.1.3'
classpath 'com.android.tools.build:gradle:3.5.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.10'
}
}

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

repositories {
mavenCentral()
google()
maven {
url './flutter_locker'
}
maven {
url 'https://storage.googleapis.com/download.flutter.io'
rootProject.allprojects {
repositories {
google()
jcenter()
}
}

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'com.google.protobuf'

android {
compileSdkVersion 31
compileSdkVersion 28

sourceSets {
main {
proto.srcDir '../protos'
java.srcDirs += 'src/main/kotlin'
}
}
defaultConfig {
minSdkVersion 21
minSdkVersion 16
}
lintOptions {
disable 'InvalidPackage'
}
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
}

configurations {
profileImplementation{}
protobuf {
// Configure the protoc executable
protoc {
// Download from repositories
artifact = 'com.google.protobuf:protoc:3.9.1:osx-x86_64'
}
plugins {
javalite {
// The codegen for lite comes as a separate artifact
artifact = 'com.google.protobuf:protoc-gen-javalite:3.0.0:osx-x86_64'
}
}
generateProtoTasks {
all().each { task ->
task.plugins {
javalite { }
}
}
}
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'co.infinum:goldfinger:2.0.1'
implementation 'co.infinum:goldfinger:2.0.0'
implementation 'com.google.protobuf:protobuf-lite:3.0.1'
}
1 change: 1 addition & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
org.gradle.jvmargs=-Xmx1536M
android.enableR8=true
android.useAndroidX=true
android.enableJetifier=true
Binary file removed android/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
1 change: 0 additions & 1 deletion android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
include ':app'
rootProject.name = 'flutter_locker'
2 changes: 1 addition & 1 deletion android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.infinum.flutter_locker">
package="com.example.flutter_locker">
</manifest>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Autogenerated from Pigeon (v3.1.2), do not edit directly.
// See also: https://pub.dev/packages/pigeon

package com.infinum.flutter_locker;
package com.example.flutter_locker;

import android.util.Log;
import androidx.annotation.NonNull;
Expand All @@ -20,19 +20,7 @@

/** Generated class from Pigeon. */
@SuppressWarnings({"unused", "unchecked", "CodeBlock2Expr", "RedundantSuppression"})
public class FlutterLocker {

public enum LockerError {
secretNotFound(0),
authenticationCanceled(1),
authenticationFailed(2),
unknown(3);

private int index;
private LockerError(final int index) {
this.index = index;
}
}
public class Pigeon {

/** Generated class from Pigeon that represents data sent in messages. */
public static class RetrieveSecretRequest {
Expand Down Expand Up @@ -295,9 +283,9 @@ public interface Result<T> {
void success(T result);
void error(Throwable error);
}
private static class FlutterLockerApiCodec extends StandardMessageCodec {
public static final FlutterLockerApiCodec INSTANCE = new FlutterLockerApiCodec();
private FlutterLockerApiCodec() {}
private static class PigeonApiCodec extends StandardMessageCodec {
public static final PigeonApiCodec INSTANCE = new PigeonApiCodec();
private PigeonApiCodec() {}
@Override
protected Object readValueOfType(byte type, ByteBuffer buffer) {
switch (type) {
Expand Down Expand Up @@ -343,22 +331,22 @@ protected void writeValue(ByteArrayOutputStream stream, Object value) {
}

/** Generated interface from Pigeon that represents a handler of messages from Flutter.*/
public interface FlutterLockerApi {
public interface PigeonApi {
void canAuthenticate(Result<Boolean> result);
void save(@NonNull SaveSecretRequest request, Result<Boolean> result);
void retrieve(@NonNull RetrieveSecretRequest request, Result<String> result);
void delete(@NonNull String key, Result<Void> result);

/** The codec used by FlutterLockerApi. */
/** The codec used by PigeonApi. */
static MessageCodec<Object> getCodec() {
return FlutterLockerApiCodec.INSTANCE;
return PigeonApiCodec.INSTANCE;
}

/** Sets up an instance of `FlutterLockerApi` to handle messages through the `binaryMessenger`. */
static void setup(BinaryMessenger binaryMessenger, FlutterLockerApi api) {
/** Sets up an instance of `PigeonApi` to handle messages through the `binaryMessenger`. */
static void setup(BinaryMessenger binaryMessenger, PigeonApi api) {
{
BasicMessageChannel<Object> channel =
new BasicMessageChannel<>(binaryMessenger, "dev.flutter.pigeon.FlutterLockerApi.canAuthenticate", getCodec());
new BasicMessageChannel<>(binaryMessenger, "dev.flutter.pigeon.PigeonApi.canAuthenticate", getCodec());
if (api != null) {
channel.setMessageHandler((message, reply) -> {
Map<String, Object> wrapped = new HashMap<>();
Expand Down Expand Up @@ -387,7 +375,7 @@ public void error(Throwable error) {
}
{
BasicMessageChannel<Object> channel =
new BasicMessageChannel<>(binaryMessenger, "dev.flutter.pigeon.FlutterLockerApi.save", getCodec());
new BasicMessageChannel<>(binaryMessenger, "dev.flutter.pigeon.PigeonApi.save", getCodec());
if (api != null) {
channel.setMessageHandler((message, reply) -> {
Map<String, Object> wrapped = new HashMap<>();
Expand Down Expand Up @@ -421,7 +409,7 @@ public void error(Throwable error) {
}
{
BasicMessageChannel<Object> channel =
new BasicMessageChannel<>(binaryMessenger, "dev.flutter.pigeon.FlutterLockerApi.retrieve", getCodec());
new BasicMessageChannel<>(binaryMessenger, "dev.flutter.pigeon.PigeonApi.retrieve", getCodec());
if (api != null) {
channel.setMessageHandler((message, reply) -> {
Map<String, Object> wrapped = new HashMap<>();
Expand Down Expand Up @@ -455,7 +443,7 @@ public void error(Throwable error) {
}
{
BasicMessageChannel<Object> channel =
new BasicMessageChannel<>(binaryMessenger, "dev.flutter.pigeon.FlutterLockerApi.delete", getCodec());
new BasicMessageChannel<>(binaryMessenger, "dev.flutter.pigeon.PigeonApi.delete", getCodec());
if (api != null) {
channel.setMessageHandler((message, reply) -> {
Map<String, Object> wrapped = new HashMap<>();
Expand Down
Loading

0 comments on commit d520e23

Please sign in to comment.
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy