Skip to content

Commit 58c77a2

Browse files
committed
Adding Sample app and modified the library folder name
1 parent 7b8d655 commit 58c77a2

File tree

38 files changed

+736
-6
lines changed

38 files changed

+736
-6
lines changed

build.gradle

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2+
3+
buildscript {
4+
repositories {
5+
jcenter()
6+
}
7+
dependencies {
8+
classpath 'com.android.tools.build:gradle:2.3.0'
9+
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
10+
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
11+
}
12+
}
13+
14+
allprojects {
15+
repositories {
16+
jcenter()
17+
maven {
18+
url "http://dl.bintray.com/madrapps/maven"
19+
}
20+
}
21+
}
22+
23+
task clean(type: Delete) {
24+
delete rootProject.buildDir
25+
}

eyedropper/build.gradle

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
apply plugin: 'com.android.library'
2+
apply plugin: 'com.github.dcendents.android-maven'
3+
apply plugin: "com.jfrog.bintray"
4+
5+
6+
def projectVersion = "1.0.0"
7+
def projectGroupId = "com.github.madrapps"
8+
def siteUrl = 'https://github.com/Madrapps/EyeDropper'
9+
def gitUrl = 'https://github.com/Madrapps/EyeDropper.git'
10+
def fullName = "com.github.madrapps:eyedropper"
11+
12+
version = projectVersion
13+
group = projectGroupId
14+
15+
android {
16+
compileSdkVersion 25
17+
buildToolsVersion "25.0.2"
18+
19+
defaultConfig {
20+
minSdkVersion 11
21+
targetSdkVersion 25
22+
versionCode 1
23+
versionName version
24+
25+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
26+
27+
}
28+
buildTypes {
29+
release {
30+
minifyEnabled false
31+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
32+
}
33+
}
34+
}
35+
36+
dependencies {
37+
compile fileTree(dir: 'libs', include: ['*.jar'])
38+
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
39+
exclude group: 'com.android.support', module: 'support-annotations'
40+
})
41+
compile 'com.android.support:support-annotations:25.3.1'
42+
testCompile 'junit:junit:4.12'
43+
}
44+
45+
install {
46+
repositories.mavenInstaller {
47+
pom {
48+
project {
49+
packaging 'aar'
50+
51+
groupId projectGroupId
52+
53+
name fullName
54+
description = 'An android library to pick colors from any image loaded in an ImageView or anything drawn on a Custom View'
55+
url siteUrl
56+
57+
licenses {
58+
license {
59+
name 'The Apache Software License, Version 2.0'
60+
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
61+
}
62+
}
63+
64+
scm {
65+
connection gitUrl
66+
developerConnection gitUrl
67+
url siteUrl
68+
}
69+
}
70+
}
71+
}
72+
}
73+
74+
task sourcesJar(type: Jar) {
75+
from android.sourceSets.main.java.srcDirs
76+
classifier = 'sources'
77+
}
78+
79+
task javadoc(type: Javadoc) {
80+
source = android.sourceSets.main.java.srcDirs
81+
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
82+
}
83+
84+
task javadocJar(type: Jar, dependsOn: javadoc) {
85+
classifier = 'javadoc'
86+
from javadoc.destinationDir
87+
}
88+
89+
artifacts {
90+
archives javadocJar
91+
archives sourcesJar
92+
}
93+
94+
Properties properties = new Properties()
95+
properties.load(project.rootProject.file('local.properties').newDataInputStream())
96+
97+
bintray {
98+
user = properties.getProperty("bintray.user")
99+
key = properties.getProperty("bintray.apikey")
100+
101+
configurations = ['archives']
102+
pkg {
103+
repo = "maven"
104+
name = fullName
105+
userOrg = "madrapps"
106+
websiteUrl = siteUrl
107+
vcsUrl = gitUrl
108+
licenses = ["Apache-2.0"]
109+
publish = true
110+
version {
111+
gpg {
112+
sign = true
113+
}
114+
}
115+
}
116+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package com.madrapps.eyedropper;
2+
3+
import android.content.Context;
4+
import android.support.test.InstrumentationRegistry;
5+
import android.support.test.runner.AndroidJUnit4;
6+
7+
import org.junit.Test;
8+
import org.junit.runner.RunWith;
9+
10+
import static org.junit.Assert.*;
11+
12+
/**
13+
* Instrumentation test, which will execute on an Android device.
14+
*
15+
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
16+
*/
17+
@RunWith(AndroidJUnit4.class)
18+
public class ExampleInstrumentedTest {
19+
@Test
20+
public void useAppContext() throws Exception {
21+
// Context of the app under test.
22+
Context appContext = InstrumentationRegistry.getTargetContext();
23+
24+
assertEquals("com.madrapps.eyedropper.test", appContext.getPackageName());
25+
}
26+
}

library/src/main/java/com/madrapps/eyedropper/EyeDropper.java renamed to eyedropper/src/main/java/com/madrapps/eyedropper/EyeDropper.java

File renamed without changes.

gradle/wrapper/gradle-wrapper.jar

52.4 KB
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Sun Apr 30 08:56:55 IST 2017
2+
distributionBase=GRADLE_USER_HOME
3+
distributionPath=wrapper/dists
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip

gradlew

Lines changed: 160 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)