Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
classpath 'com.android.tools.build:gradle:3.5.3'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
8 changes: 5 additions & 3 deletions simplecropview-sample/src/main/res/layout/fragment_basic.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,17 @@
custom:scv_frame_color="@color/colorAccent"
custom:scv_frame_stroke_weight="1dp"
custom:scv_guide_color="@color/colorAccent"
custom:scv_guide_show_mode="show_always"
custom:scv_guide_show_mode="show_on_touch"
custom:scv_guide_stroke_weight="1dp"
custom:scv_handle_color="@color/colorAccent"
custom:scv_handle_show_mode="show_always"
custom:scv_handle_size="14dp"
custom:scv_handle_size="6dp"
custom:scv_min_frame_size="50dp"
custom:scv_overlay_color="@color/overlay"
custom:scv_touch_padding="8dp"
/>
custom:scv_handle_stroke_size = "5dp"
custom:scv_handle_stroke_color = "#fd5c02"
custom:scv_frame_side_dragging_enabled = "false"/>

<View
android:layout_width="match_parent"
Expand Down
174 changes: 100 additions & 74 deletions simplecropview/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ android {
minSdkVersion 14
targetSdkVersion 28
versionCode 26
versionName "1.1.8"
versionName "1.0.0"
consumerProguardFiles 'proguard-rules.pro'
}

Expand All @@ -24,87 +24,113 @@ android {
}
}

def file = project.rootProject.file('local.properties')
if (!file.exists()) return
apply plugin: 'maven'

apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'
def MAVEN_SERVER_URL = 'http://maven.ysbang.cn:8081/repository/maven-android/'
def ARTIFACT_ID = 'simplecropview'
def VERSION_NAME = '1.0.0'
def GROUP_ID = 'com.ysbang'
def MAVEN_SERVER_ACCOUNT = 'androiduser'
def MAVEN_SERVER_PWD = 'android123'

group = 'com.isseiaoki'
version = '1.1.8'
def siteUrl = 'https://github.com/IsseiAoki/SimpleCropView'
def gitUrl = 'https://github.com/IsseiAoki/SimpleCropView.git'
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
uploadArchives {

bintray {
repositories {

user = properties.getProperty("bintray.user")
key = properties.getProperty("bintray.apikey")

configurations = ['archives'] //When uploading configuration files
pkg {
repo = 'maven'
name = 'SimpleCropView'
desc = 'A simple image cropping library for Android.'
websiteUrl = siteUrl
issueTrackerUrl = 'https://github.com/IsseiAoki/SimpleCropView/issues'
vcsUrl = gitUrl
licenses = ['MIT']
labels = ['android']
publicDownloadNumbers = true
}
}
mavenDeployer {
repository(url:MAVEN_SERVER_URL) {
authentication(userName:MAVEN_SERVER_ACCOUNT, password:MAVEN_SERVER_PWD)
}

install {
repositories.mavenInstaller {
pom {
project {
pom.project {
groupId GROUP_ID
artifactId ARTIFACT_ID
version VERSION_NAME
packaging 'aar'
name 'SimpleCropView'
url siteUrl
licenses {
license {
name 'The MIT License (MIT)'
url 'http://opensource.org/licenses/MIT'
}
}
developers {
developer {
id 'isseiaoki'
name 'Issei Aoki'
email '[email protected]'
}
}
scm {
connection 'https://github.com/IsseiAoki/SimpleCropView.git'
developerConnection 'https://github.com/IsseiAoki/SimpleCropView.git'
url siteUrl
}
}
}
}
}

task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}

task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives javadocJar
archives sourcesJar
}

task findConventions << {
println project.getConvention()
}
//def file = project.rootProject.file('local.properties')
//if (!file.exists()) return
//
//apply plugin: 'com.github.dcendents.android-maven'
//apply plugin: 'com.jfrog.bintray'
//
//group = 'com.isseiaoki'
//version = '1.1.9'
//def siteUrl = 'https://github.com/IsseiAoki/SimpleCropView'
//def gitUrl = 'https://github.com/IsseiAoki/SimpleCropView.git'
//Properties properties = new Properties()
//properties.load(project.rootProject.file('local.properties').newDataInputStream())
//
//bintray {
//
// user = properties.getProperty("bintray.user")
// key = properties.getProperty("bintray.apikey")
//
// configurations = ['archives'] //When uploading configuration files
// pkg {
// repo = 'maven'
// name = 'SimpleCropView'
// desc = 'A simple image cropping library for Android.'
// websiteUrl = siteUrl
// issueTrackerUrl = 'https://github.com/IsseiAoki/SimpleCropView/issues'
// vcsUrl = gitUrl
// licenses = ['MIT']
// labels = ['android']
// publicDownloadNumbers = true
// }
//}
//
//install {
// repositories.mavenInstaller {
// pom {
// project {
// packaging 'aar'
// name 'SimpleCropView'
// url siteUrl
// licenses {
// license {
// name 'The MIT License (MIT)'
// url 'http://opensource.org/licenses/MIT'
// }
// }
// developers {
// developer {
// id 'isseiaoki'
// name 'Issei Aoki'
// email '[email protected]'
// }
// }
// scm {
// connection 'https://github.com/IsseiAoki/SimpleCropView.git'
// developerConnection 'https://github.com/IsseiAoki/SimpleCropView.git'
// url siteUrl
// }
// }
// }
// }
//}

//task sourcesJar(type: Jar) {
// from android.sourceSets.main.java.srcDirs
// classifier = 'sources'
//}
//
//task javadoc(type: Javadoc) {
// source = android.sourceSets.main.java.srcDirs
// classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
//}
//
//task javadocJar(type: Jar, dependsOn: javadoc) {
// classifier = 'javadoc'
// from javadoc.destinationDir
//}
//artifacts {
// archives javadocJar
// archives sourcesJar
//}

//t
Loading