Skip to content

Commit 06d02a0

Browse files
committed
add and config empty custom module
1 parent 72eaed4 commit 06d02a0

File tree

12 files changed

+162
-1
lines changed

12 files changed

+162
-1
lines changed

.idea/gradle.xml

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

.idea/jarRepositories.xml

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

.idea/vcs.xml

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

app/build.gradle

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ android {
2222
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
2323
}
2424
}
25+
2526
compileOptions {
2627
sourceCompatibility JavaVersion.VERSION_1_8
2728
targetCompatibility JavaVersion.VERSION_1_8
@@ -33,7 +34,10 @@ dependencies {
3334
implementation 'androidx.appcompat:appcompat:1.2.0'
3435
implementation 'com.google.android.material:material:1.3.0'
3536
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
36-
testImplementation 'junit:junit:4.+'
37+
38+
implementation project(":custom")
39+
40+
testImplementation 'junit:junit:4.13.2'
3741
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
3842
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
3943
}

custom/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

custom/build.gradle

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
plugins {
2+
id 'com.android.library'
3+
id 'maven-publish'
4+
}
5+
6+
repositories {
7+
mavenCentral()
8+
google()
9+
jcenter()
10+
maven { url "https://jitpack.io" }
11+
}
12+
13+
group = 'com.github.jitpack'
14+
version = '1.0'
15+
16+
android {
17+
compileSdkVersion 30
18+
buildToolsVersion "30.0.2"
19+
20+
defaultConfig {
21+
minSdkVersion 19
22+
targetSdkVersion 30
23+
versionCode 1
24+
versionName "1.0"
25+
26+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
27+
consumerProguardFiles "consumer-rules.pro"
28+
}
29+
30+
buildTypes {
31+
release {
32+
minifyEnabled false
33+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
34+
}
35+
}
36+
37+
compileOptions {
38+
sourceCompatibility JavaVersion.VERSION_1_8
39+
targetCompatibility JavaVersion.VERSION_1_8
40+
}
41+
42+
buildFeatures {
43+
viewBinding = true
44+
}
45+
}
46+
47+
dependencies {
48+
implementation 'androidx.appcompat:appcompat:1.2.0'
49+
implementation 'com.google.android.material:material:1.3.0'
50+
51+
testImplementation 'junit:junit:4.13.2'
52+
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
53+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
54+
}
55+
56+
afterEvaluate {
57+
publishing {
58+
publications {
59+
// Creates a Maven publication called "release".
60+
release(MavenPublication) {
61+
from components.release
62+
groupId = 'com.github.jitpack'
63+
artifactId = 'horizontal-divider'
64+
version = '1.0'
65+
}
66+
}
67+
}
68+
}

custom/consumer-rules.pro

Whitespace-only changes.

custom/proguard-rules.pro

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package com.isolpro.custom;
2+
3+
import android.content.Context;
4+
5+
import androidx.test.platform.app.InstrumentationRegistry;
6+
import androidx.test.ext.junit.runners.AndroidJUnit4;
7+
8+
import org.junit.Test;
9+
import org.junit.runner.RunWith;
10+
11+
import static org.junit.Assert.*;
12+
13+
/**
14+
* Instrumented test, which will execute on an Android device.
15+
*
16+
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
17+
*/
18+
@RunWith(AndroidJUnit4.class)
19+
public class ExampleInstrumentedTest {
20+
@Test
21+
public void useAppContext() {
22+
// Context of the app under test.
23+
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
24+
assertEquals("com.isolpro.custom.test", appContext.getPackageName());
25+
}
26+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.isolpro.custom">
4+
5+
</manifest>

0 commit comments

Comments
 (0)