Skip to content

Commit

Permalink
moving to the lib
Browse files Browse the repository at this point in the history
  • Loading branch information
lecicdjuro committed Mar 10, 2021
1 parent 23e7530 commit db76c42
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 36 deletions.
22 changes: 18 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
apply plugin: 'com.android.application'
//apply plugin: 'com.android.application'
apply plugin: 'com.android.library'
apply plugin: 'maven'

android {
compileSdkVersion cfgs.compileSdkVersion

defaultConfig {
applicationId "com.luck.pictureselector"
// applicationId "com.luck.pictureselector"
minSdkVersion cfgs.minSdkVersion
targetSdkVersion cfgs.targetSdkVersion
versionCode cfgs.versionCode
Expand Down Expand Up @@ -32,11 +34,23 @@ android {
}
}

uploadArchives {
repositories.mavenDeployer {
repository(url: "http://nexus.carnegietechnologies.rs:8085/repository/android-library/") {
authentication(userName: "deployment", password: "deployment123")
pom.groupId = "com.carnegietechnologies.flutter"
pom.artifactId = "instagramGallery"
pom.version = "${cfgs.insGalleryVersion}"
}
}
}

dependencies {
implementation project(':picture_library')
implementation "androidx.appcompat:appcompat:${cfgs.version_appcompat}"
implementation "androidx.recyclerview:recyclerview:${cfgs.version_recyclerview}"
implementation "androidx.camera:camera-camera2:${cfgs.camerax_version}"
implementation "com.github.bumptech.glide:glide:${cfgs.glide_version}"
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.2'
implementation("com.carnegietechnologies.flutter:pictureLibrary:7.0.2")
// implementation("com.carnegietechnologies.flutter:ucrop:7.0.2")
implementation 'com.squareup.leakcanary:leakcanary-android:2.2'
}
1 change: 1 addition & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@

#rxandroid
-dontwarn sun.misc.**
-dontwarn com.yalantis.ucrop.**
-keepclassmembers class rx.internal.util.unsafe.*ArrayQueue*Field* {
long producerIndex;
long consumerIndex;
Expand Down
56 changes: 27 additions & 29 deletions app/src/main/java/com/luck/pictureselector/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ protected void onCreate(Bundle savedInstanceState) {
PictureSelector.create(MainActivity.this)
.themeStyle(R.style.picture_default_style) // xml设置主题
//.setPictureWindowAnimationStyle(animationStyle)// 自定义页面启动动画
.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT)// 设置相册Activity方向,不设置默认使用系统
.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED)// 设置相册Activity方向,不设置默认使用系统
.isNotPreviewDownload(true)// 预览图片长按是否可以下载
//.bindCustomPlayVideoCallback(callback)// 自定义播放回调控制,用户可以使用自己的视频播放界面
.loadImageEngine(GlideEngine.createGlideEngine())// 外部传入图片加载引擎,必传项
Expand Down Expand Up @@ -392,38 +392,36 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) {

@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.left_back:
finish();
break;
case R.id.minus:
if (maxSelectNum > 1) {
maxSelectNum--;
}
tv_select_num.setText(maxSelectNum + "");
mAdapter.setSelectMax(maxSelectNum);
break;
case R.id.plus:
maxSelectNum++;
tv_select_num.setText(maxSelectNum + "");
mAdapter.setSelectMax(maxSelectNum);
break;
}
// switch (v.getId()) {
// case R.id.left_back:
// finish();
// break;
// case R.id.minus:
// if (maxSelectNum > 1) {
// maxSelectNum--;
// }
// tv_select_num.setText(maxSelectNum + "");
// mAdapter.setSelectMax(maxSelectNum);
// break;
// case R.id.plus:
// maxSelectNum++;
// tv_select_num.setText(maxSelectNum + "");
// mAdapter.setSelectMax(maxSelectNum);
// break;
// }
}

@Override
public void onCheckedChanged(RadioGroup group, @IdRes int checkedId) {
switch (checkedId) {
case R.id.rb_default_style:
InsGallery.setCurrentTheme(InsGallery.THEME_STYLE_DEFAULT);
break;
case R.id.rb_dark_style:
InsGallery.setCurrentTheme(InsGallery.THEME_STYLE_DARK);
break;
case R.id.rb_dark_blue_style:
InsGallery.setCurrentTheme(InsGallery.THEME_STYLE_DARK_BLUE);
break;
}
// case R.id.rb_default_style:
// InsGallery.setCurrentTheme(InsGallery.THEME_STYLE_DEFAULT);
// break;
// case R.id.rb_dark_style:
// InsGallery.setCurrentTheme(InsGallery.THEME_STYLE_DARK);
// break;
// case R.id.rb_dark_blue_style:
// InsGallery.setCurrentTheme(InsGallery.THEME_STYLE_DARK_BLUE);
// break;
}

@Override
Expand Down
7 changes: 6 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ buildscript {
name 'Google'
}
google()
maven { url "http://nexus.carnegietechnologies.rs:8085/repository/android-library/" }

}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.3'
classpath 'com.novoda:bintray-release:0.9.2'
// classpath 'com.novoda:bintray-release:0.9.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand All @@ -28,6 +30,9 @@ allprojects {
url 'https://maven.google.com/'
name 'Google'
}

maven { url "http://nexus.carnegietechnologies.rs:8085/repository/android-library/" }

}
}

Expand Down
2 changes: 1 addition & 1 deletion config.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ext {
versionCode : 36,
versionName : "0.7.1",
ucropVersionCode : 25,
ucropVersionName : "2.2.5-native",
// ucropVersionName : "2.2.5-native",
insGalleryVersion : "7.0.2",

//open version control
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include ':app', ':picture_library', ':ucrop'
include ':app'

0 comments on commit db76c42

Please sign in to comment.