Skip to content
This repository was archived by the owner on Sep 12, 2023. It is now read-only.

Commit e3193ea

Browse files
committed
thingy
1 parent 71ba09f commit e3193ea

File tree

28 files changed

+449
-11
lines changed

28 files changed

+449
-11
lines changed

.idea/misc.xml

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

TeamCode/build.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ dependencies {
2525
implementation project(':Control')
2626
implementation project(':Logger')
2727

28+
2829
annotationProcessor files('lib/OpModeAnnotationProcessor.jar')
2930

3031
implementation 'org.apache.commons:commons-math3:3.6.1'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package org.firstinspires.ftc.teamcode.subsystems;
2+
3+
import com.qualcomm.robotcore.hardware.DcMotorEx;
4+
import com.technototes.library.hardware.motor.EncodedMotor;
5+
import com.technototes.library.subsystem.Subsystem;
6+
7+
public class DrivebaseSubsystem implements Subsystem {
8+
9+
}

android/AndroidManifest.xml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.technototes.simulator" >
4+
5+
<application
6+
android:allowBackup="true"
7+
android:icon="@drawable/ic_launcher"
8+
android:isGame="true"
9+
android:appCategory="game"
10+
android:label="@string/app_name"
11+
android:theme="@style/GdxTheme" >
12+
<activity
13+
android:name="com.technototes.simulator.AndroidLauncher"
14+
android:label="@string/app_name"
15+
android:screenOrientation="landscape"
16+
android:configChanges="keyboard|keyboardHidden|navigation|orientation|screenSize|screenLayout">
17+
<intent-filter>
18+
<action android:name="android.intent.action.MAIN" />
19+
<category android:name="android.intent.category.LAUNCHER" />
20+
</intent-filter>
21+
</activity>
22+
</application>
23+
24+
</manifest>

android/assets/badlogic.jpg

66.9 KB
Loading

android/build.gradle

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
android {
2+
buildToolsVersion "30.0.1"
3+
compileSdkVersion 30
4+
sourceSets {
5+
main {
6+
manifest.srcFile 'AndroidManifest.xml'
7+
java.srcDirs = ['src']
8+
aidl.srcDirs = ['src']
9+
renderscript.srcDirs = ['src']
10+
res.srcDirs = ['res']
11+
assets.srcDirs = ['assets']
12+
jniLibs.srcDirs = ['libs']
13+
}
14+
15+
}
16+
packagingOptions {
17+
exclude 'META-INF/robovm/ios/robovm.xml'
18+
}
19+
defaultConfig {
20+
applicationId "com.technototes.simulator"
21+
minSdkVersion 25
22+
targetSdkVersion 30
23+
versionCode 1
24+
versionName "1.0"
25+
}
26+
buildTypes {
27+
release {
28+
minifyEnabled true
29+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
30+
}
31+
}
32+
}
33+
34+
35+
// called every time gradle gets executed, takes the native dependencies of
36+
// the natives configuration, and extracts them to the proper libs/ folders
37+
// so they get packed with the APK.
38+
task copyAndroidNatives {
39+
doFirst {
40+
file("libs/armeabi/").mkdirs()
41+
file("libs/armeabi-v7a/").mkdirs()
42+
file("libs/arm64-v8a/").mkdirs()
43+
file("libs/x86_64/").mkdirs()
44+
file("libs/x86/").mkdirs()
45+
46+
configurations.natives.copy().files.each { jar ->
47+
def outputDir = null
48+
if (jar.name.endsWith("natives-arm64-v8a.jar")) outputDir = file("libs/arm64-v8a")
49+
if (jar.name.endsWith("natives-armeabi-v7a.jar")) outputDir = file("libs/armeabi-v7a")
50+
if(jar.name.endsWith("natives-armeabi.jar")) outputDir = file("libs/armeabi")
51+
if(jar.name.endsWith("natives-x86_64.jar")) outputDir = file("libs/x86_64")
52+
if(jar.name.endsWith("natives-x86.jar")) outputDir = file("libs/x86")
53+
if(outputDir != null) {
54+
copy {
55+
from zipTree(jar)
56+
into outputDir
57+
include "*.so"
58+
}
59+
}
60+
}
61+
}
62+
}
63+
64+
tasks.whenTaskAdded { packageTask ->
65+
if (packageTask.name.contains("package")) {
66+
packageTask.dependsOn 'copyAndroidNatives'
67+
}
68+
}
69+
70+
task run(type: Exec) {
71+
def path
72+
def localProperties = project.file("../local.properties")
73+
if (localProperties.exists()) {
74+
Properties properties = new Properties()
75+
localProperties.withInputStream { instr ->
76+
properties.load(instr)
77+
}
78+
def sdkDir = properties.getProperty('sdk.dir')
79+
if (sdkDir) {
80+
path = sdkDir
81+
} else {
82+
path = "$System.env.ANDROID_HOME"
83+
}
84+
} else {
85+
path = "$System.env.ANDROID_HOME"
86+
}
87+
88+
def adb = path + "/platform-tools/adb"
89+
commandLine "$adb", 'shell', 'am', 'start', '-n', 'com.technototes.simulator/com.technototes.simulator.AndroidLauncher'
90+
}
91+
92+
eclipse.project.name = appName + "-android"

android/ic_launcher-web.png

21.7 KB
Loading

android/proguard-rules.pro

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# To enable ProGuard in your project, edit project.properties
2+
# to define the proguard.config property as described in that file.
3+
#
4+
# Add project specific ProGuard rules here.
5+
# By default, the flags in this file are appended to flags specified
6+
# in ${sdk.dir}/tools/proguard/proguard-android.txt
7+
# You can edit the include path and order by changing the ProGuard
8+
# include property in project.properties.
9+
#
10+
# For more details, see
11+
# http://developer.android.com/guide/developing/tools/proguard.html
12+
13+
# Add any project specific keep options here:
14+
15+
# If your project uses WebView with JS, uncomment the following
16+
# and specify the fully qualified class name to the JavaScript interface
17+
# class:
18+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
19+
# public *;
20+
#}
21+
22+
-verbose
23+
24+
-dontwarn com.badlogic.gdx.backends.android.AndroidFragmentApplication
25+
-dontwarn com.badlogic.gdx.utils.GdxBuild
26+
-dontwarn com.badlogic.gdx.physics.box2d.utils.Box2DBuild
27+
-dontwarn com.badlogic.gdx.jnigen.BuildTarget*
28+
-dontwarn com.badlogic.gdx.graphics.g2d.freetype.FreetypeBuild
29+
30+
# Required if using Gdx-Controllers extension
31+
-keep class com.badlogic.gdx.controllers.android.AndroidControllers
32+
33+
# Required if using Box2D extension
34+
-keepclassmembers class com.badlogic.gdx.physics.box2d.World {
35+
boolean contactFilter(long, long);
36+
void beginContact(long);
37+
void endContact(long);
38+
void preSolve(long, long);
39+
void postSolve(long, long);
40+
boolean reportFixture(long);
41+
float reportRayFixture(long, float, float, float, float, float);
42+
}

android/project.properties

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# This file is used by the Eclipse ADT plugin. It is unnecessary for IDEA and Android Studio projects, which
2+
# configure Proguard and the Android target via the build.gradle file.
3+
4+
# To enable ProGuard to work with Eclipse ADT, uncomment this (available properties: sdk.dir, user.home)
5+
# and ensure proguard.jar in the Android SDK is up to date (or alternately reduce the android target to 23 or lower):
6+
# proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-rules.pro
7+
8+
# Project target.
9+
target=android-19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<adaptive-icon
3+
xmlns:android="http://schemas.android.com/apk/res/android">
4+
<background android:drawable="@color/ic_background_color"/>
5+
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
6+
</adaptive-icon>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="108dp"
3+
android:height="108dp"
4+
android:viewportWidth="108"
5+
android:viewportHeight="108">
6+
<path
7+
android:pathData="M22,48.667l2.987,0l0,10.667l-2.987,0z"
8+
android:fillColor="#000000"
9+
android:strokeColor="#00000000"
10+
android:fillAlpha="1"/>
11+
<path
12+
android:pathData="M26.907,52.72l2.987,0l0,6.613l-2.987,0z"
13+
android:fillColor="#000000"
14+
android:strokeColor="#00000000"
15+
android:fillAlpha="1"/>
16+
<path
17+
android:pathData="M26.907,48.667l2.987,0l0,2.56l-2.987,0z"
18+
android:fillColor="#000000"
19+
android:strokeColor="#00000000"
20+
android:fillAlpha="1"/>
21+
<path
22+
android:pathData="M31.813,48.667L31.813,52.72 31.813,55.067 31.813,56.767 31.813,59.333l2.992,0 2.117,0c1.654,0 2.998,-1.481 2.998,-3.307 0,-1.826 -1.344,-3.307 -2.998,-3.307l-2.117,0L34.805,48.667ZM34.805,55.067l1.269,0c0.469,0 0.848,0.384 0.848,0.853 0,0.469 -0.379,0.847 -0.848,0.847l-1.269,0z"
23+
android:fillColor="#000000"
24+
android:strokeColor="#00000000"
25+
android:fillAlpha="1"/>
26+
<path
27+
android:pathData="m44.192,48.667c-1.65,0 -2.992,1.481 -2.992,3.307 0,0.023 -0,0.044 0,0.067 0,0.004 -0,0.009 0,0.013l0,3.893c-0.001,0.027 0,0.053 0,0.08 0,1.826 1.341,3.307 2.992,3.307l2.112,0 0.247,0 2.739,0 0.247,0 2.112,0c1.651,0 2.992,-1.481 2.992,-3.307 0,-1.826 -1.341,-3.307 -2.992,-3.307l-1.199,0 -0.48,0 -2.372,0l0,2.347l2.372,0 0.48,0 0.353,0c0.468,0 0.846,0.384 0.846,0.853 0,0.469 -0.378,0.847 -0.846,0.847l-0.833,0 -0.433,0 -0.247,0 -2.739,0 -0.247,0 -0.433,0 -0.833,0c-0.459,0 -0.832,-0.363 -0.846,-0.82l0,-3.893 0,-0.013c0.021,-0.45 0.391,-0.807 0.846,-0.807l0.833,0 0.433,0 1.293,0l0,0.007L54.207,51.24L54.207,48.667l-4.917,0 -1.692,0 -1.293,0 -2.112,0z"
28+
android:fillColor="#e74a45"
29+
android:strokeColor="#00000000"
30+
android:fillAlpha="1"/>
31+
<path
32+
android:pathData="M56.133,48.667L56.133,51.238l5.406,0 1.859,0 1.105,0 0.43,0 0.827,0c0.452,0 0.82,0.356 0.84,0.806l0,0.013 0,3.891c-0.014,0.456 -0.384,0.819 -0.84,0.819l-0.827,0 -0.43,0 -1.899,0 -1.065,0 -2.442,0L59.098,52.724L56.133,52.724l0,4.044 0,1.752 0,0.813l5.406,0 1.065,0 1.899,0 2.098,0c1.639,0 2.971,-1.48 2.971,-3.305 0,-0.027 0.001,-0.053 0,-0.08L69.573,52.058c0,-0.004 -0,-0.009 0,-0.013 0,-0.022 0,-0.044 0,-0.067 0,-1.825 -1.332,-3.305 -2.971,-3.305l-2.098,0 -1.105,0l0,-0.007L56.133,48.667Z"
33+
android:fillColor="#e74a45"
34+
android:strokeColor="#00000000"
35+
android:fillAlpha="1"/>
36+
<path
37+
android:pathData="M69.572,48.667L73.72,48.667L77.787,52.733 81.853,48.667l4.147,0l-5.333,5.333 5.333,5.333L81.853,59.333L77.787,55.267 73.72,59.333l-4.147,0l5.333,-5.333z"
38+
android:fillColor="#e74a45"
39+
android:strokeColor="#00000000"/>
40+
</vector>
16.4 KB
Loading
15.7 KB
Loading
17.5 KB
Loading
18.3 KB
Loading
19 KB
Loading

android/res/values/color.xml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<color name="ic_background_color">#FFFFFFFF</color>
4+
</resources>

android/res/values/strings.xml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
4+
<string name="app_name">Simulator</string>
5+
6+
</resources>

android/res/values/styles.xml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<resources>
2+
3+
<style name="GdxTheme" parent="android:Theme">
4+
<item name="android:windowBackground">@android:color/transparent</item>
5+
<item name="android:colorBackgroundCacheHint">@null</item>
6+
<item name="android:windowAnimationStyle">@android:style/Animation</item>
7+
<item name="android:windowNoTitle">true</item>
8+
<item name="android:windowContentOverlay">@null</item>
9+
<item name="android:windowFullscreen">true</item>
10+
</style>
11+
12+
</resources>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package com.technototes.simulator;
2+
3+
import android.os.Bundle;
4+
5+
import com.badlogic.gdx.backends.android.AndroidApplication;
6+
import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration;
7+
import com.technototes.simulator.Simulator;
8+
9+
public class AndroidLauncher extends AndroidApplication {
10+
@Override
11+
protected void onCreate (Bundle savedInstanceState) {
12+
super.onCreate(savedInstanceState);
13+
AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
14+
initialize(new Simulator(), config);
15+
}
16+
}

build.common.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ android {
100100
signingConfig signingConfigs.release
101101

102102
ndk {
103-
abiFilters "armeabi-v7a"//, "arm64-v8a"
103+
abiFilters "armeabi-v7a", "x86"
104104
}
105105

106106
if (useProguard) {
@@ -115,7 +115,7 @@ android {
115115
jniDebuggable true
116116
renderscriptDebuggable true
117117
ndk {
118-
abiFilters "armeabi-v7a"//, "arm64-v8a"
118+
abiFilters "armeabi-v7a", "x86"
119119
}
120120

121121
if (useProguard) {

0 commit comments

Comments
 (0)